test_libraryservicepane.js File Reference

Go to the source code of this file.

Functions

function runTest ()
 Advanced DataRemote unit tests. More...
 
function setup ()
 
function removeAddedItems ()
 
function DBG (s)
 
function showTree (root, prefix)
 
function testLibrariesAndContents ()
 
function testLibraryMediaLists (aLibrary)
 
function testAddingSimplePlaylists ()
 
function testInsertionLogic ()
 
function testLibrarySuggestion ()
 
function testRenaming ()
 
function testAllItemsRemoved ()
 

Variables

const DEBUG_OUTPUT = false
 Basic library service pane unit tests. More...
 
const PROP_ISLIST = "http://songbirdnest.com/data/1.0#isList"
 
const LSP
 
var libraryServicePane
 
var libraryManager
 
var listsToRemove = []
 
var librariesToRemove = []
 
var nodesToRemove = []
 

Function Documentation

function DBG (   s)

Console log helper

Definition at line 128 of file test_libraryservicepane.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function removeAddedItems ( )

Remove anything that was added during the tests

Definition at line 101 of file test_libraryservicepane.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function runTest ( )

Advanced DataRemote unit tests.

Minimal sanity check for the AddonMetadata Datasource. Assumes that coppery will be installed.

BEGIN SONGBIRD GPL

This file is part of the Songbird web player.

Copyright(c) 2005-2008 POTI, Inc. http://songbirdnest.com

This file may be licensed under the terms of of the GNU General Public License Version 2 (the "GPL").

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the GPL for the specific language governing rights and limitations.

You should have received a copy of the GPL along with this program. If not, go to http://www.gnu.org/licenses/gpl.html or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

END SONGBIRD GPL Initial file to test testharness architecture. Ultimately this file would hold more advanced unit tests.

Advanced DataRemote unit tests.

BEGIN SONGBIRD GPL

This file is part of the Songbird web player.

Copyright(c) 2005-2008 POTI, Inc. http://songbirdnest.com

This file may be licensed under the terms of of the GNU General Public License Version 2 (the "GPL").

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the GPL for the specific language governing rights and limitations.

You should have received a copy of the GPL along with this program. If not, go to http://www.gnu.org/licenses/gpl.html or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

END SONGBIRD GPL

Advanced DataRemote unit tests.

Run the unit tests.

Tests single thread synchronous and asynchronous events

Confirm that Songbird doesn't crash or damage files when metadata jobs fail

Copy some media files into a temp directory, then confirm that metadata properties can be modified using a write job.

Ensure metadata.enableWriting pref can prevent writing.

Start by creating a library and doing a directory import of the metadata unit test files.

test the localizationKey attribute on sbIPropertyInfo on registered properties

Listener used to track the events

Listener used to track the events

Definition at line 47 of file test_libraryservicepane.js.

Here is the call graph for this function:

function setup ( )

Definition at line 79 of file test_libraryservicepane.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function showTree (   root,
  prefix 
)

Debug helper to print the structure of the tree to the console

Definition at line 142 of file test_libraryservicepane.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function testAddingSimplePlaylists ( )

Add some simple playlists to the main library and confirm that they they show up in the tree

Definition at line 276 of file test_libraryservicepane.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function testAllItemsRemoved ( )

Confirm that removing the test medialists and libraries was reflected correctly in the service pane tree

Definition at line 547 of file test_libraryservicepane.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function testInsertionLogic ( )

Exercise the logic that places new library and medialist nodes in tree

TODO: Need to test grouping by type. Do this once smart playlists are ready.

Definition at line 304 of file test_libraryservicepane.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function testLibrariesAndContents ( )

Make sure all registered libraries and their associated playlists are present in the tree

Definition at line 161 of file test_libraryservicepane.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function testLibraryMediaLists (   aLibrary)

Make sure all the playlists of the given library are present in the tree

Definition at line 223 of file test_libraryservicepane.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function testLibrarySuggestion ( )

Make sure the library service pane correctly suggests a library to use for making a new playlist

Definition at line 426 of file test_libraryservicepane.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function testRenaming ( )

Make sure that when the user renames a node the changes are reflected into the library

Definition at line 507 of file test_libraryservicepane.js.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

const DEBUG_OUTPUT = false

Basic library service pane unit tests.

vim: ts=2 sw=2 expandtab ai

BEGIN SONGBIRD GPL

This file is part of the Songbird web player.

Copyright(c) 2005-2008 POTI, Inc. http://songbirdnest.com

This file may be licensed under the terms of of the GNU General Public License Version 2 (the "GPL").

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the GPL for the specific language governing rights and limitations.

You should have received a copy of the GPL along with this program. If not, go to http://www.gnu.org/licenses/gpl.html or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

END SONGBIRD GPL

Definition at line 31 of file test_libraryservicepane.js.

var librariesToRemove = []

Definition at line 42 of file test_libraryservicepane.js.

var libraryManager

Definition at line 38 of file test_libraryservicepane.js.

var libraryServicePane

Definition at line 37 of file test_libraryservicepane.js.

var listsToRemove = []

Definition at line 41 of file test_libraryservicepane.js.

const LSP
Initial value:
='http:
var servicePane

Definition at line 34 of file test_libraryservicepane.js.

var nodesToRemove = []

Definition at line 43 of file test_libraryservicepane.js.

const PROP_ISLIST = "http://songbirdnest.com/data/1.0#isList"

Definition at line 33 of file test_libraryservicepane.js.