test_playlistcommandshelper.js File Reference

Go to the source code of this file.

Functions

Components utils import ("resource://app/jsmodules/sbLibraryUtils.jsm")
 
function runTest ()
 Advanced DataRemote unit tests. More...
 
function testCreateCommandObjectForAction ()
 
function testAddAndRemoveCommandObject ()
 
function addCommandToLocations (newCommand, testMediaList, locations, guidOrType)
 
function removeCommandFromLocations (newCommand, testMediaList, locations, guidOrType)
 
function assertCommandLocations (testMediaList)
 
function checkLocationFlags (foundLocs, checkLocs)
 
function findCommandLocations (cmdID, guidOrType, testMediaList)
 
function logExistingCommands (testMediaList)
 
function addExistingToLocMap (playlistCommand, locMap, registrationLoc)
 
function flagsToString (flags)
 

Variables

const DEBUG = false
 Playlist Commands Helper Unit Test File. More...
 
const NUMRECURSE = 2
 
const TESTLENGTH = 500
 
var cmdHelper
 
var cmdMgr
 
const PlaylistCommandsBuilder
 
const INCOMPLETE_TARGET_FLAGS = cmdHelper.TARGET_TOOLBAR << 1
 
var typeLocMap = new Object()
 
var guidLocMap = new Object()
 
var testMediaList = null
 

Function Documentation

function addCommandToLocations (   newCommand,
  testMediaList,
  locations,
  guidOrType 
)

Definition at line 307 of file test_playlistcommandshelper.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function addExistingToLocMap (   playlistCommand,
  locMap,
  registrationLoc 
)

Definition at line 593 of file test_playlistcommandshelper.js.

Here is the caller graph for this function:

function assertCommandLocations (   testMediaList)

Definition at line 386 of file test_playlistcommandshelper.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function checkLocationFlags (   foundLocs,
  checkLocs 
)

Definition at line 420 of file test_playlistcommandshelper.js.

Here is the caller graph for this function:

function findCommandLocations (   cmdID,
  guidOrType,
  testMediaList 
)

Definition at line 466 of file test_playlistcommandshelper.js.

Here is the caller graph for this function:

function flagsToString (   flags)

Definition at line 632 of file test_playlistcommandshelper.js.

Here is the caller graph for this function:

Components utils import ( "resource://app/jsmodules/sbLibraryUtils.jsm"  )
function logExistingCommands (   testMediaList)

Definition at line 529 of file test_playlistcommandshelper.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function removeCommandFromLocations (   newCommand,
  testMediaList,
  locations,
  guidOrType 
)

Definition at line 346 of file test_playlistcommandshelper.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.

Listener used to track the events

Listener used to track the events

Definition at line 73 of file test_playlistcommandshelper.js.

Here is the call graph for this function:

function testAddAndRemoveCommandObject ( )

Definition at line 165 of file test_playlistcommandshelper.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function testCreateCommandObjectForAction ( )

Definition at line 100 of file test_playlistcommandshelper.js.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

var cmdHelper
Initial value:
= Cc["@songbirdnest.com/Songbird/PlaylistCommandsHelper;1"]
.getService(Ci.sbIPlaylistCommandsHelper)
const Cc
const Ci

Definition at line 45 of file test_playlistcommandshelper.js.

var cmdMgr
Initial value:
= Cc["@songbirdnest.com/Songbird/PlaylistCommandsManager;1"]
.createInstance(Ci.sbIPlaylistCommandsManager)
const Cc
const Ci

Definition at line 48 of file test_playlistcommandshelper.js.

const DEBUG = false

Playlist Commands Helper Unit Test File.

Definition at line 34 of file test_playlistcommandshelper.js.

var guidLocMap = new Object()

Definition at line 65 of file test_playlistcommandshelper.js.

const INCOMPLETE_TARGET_FLAGS = cmdHelper.TARGET_TOOLBAR << 1

Definition at line 59 of file test_playlistcommandshelper.js.

const NUMRECURSE = 2

Definition at line 37 of file test_playlistcommandshelper.js.

const PlaylistCommandsBuilder
Initial value:
= new Components.
Constructor("@songbirdnest.com/Songbird/PlaylistCommandsBuilder;1",
"sbIPlaylistCommandsBuilder")

Definition at line 51 of file test_playlistcommandshelper.js.

const TESTLENGTH = 500

Definition at line 41 of file test_playlistcommandshelper.js.

var testMediaList = null

Definition at line 68 of file test_playlistcommandshelper.js.

var typeLocMap = new Object()

Definition at line 64 of file test_playlistcommandshelper.js.