head_songbird.js File Reference

Go to the source code of this file.

Functions

function doTimeout (delay, func)
 
function doMain ()
 
function doQuit ()
 
function dumpStack ()
 
function doFail (text)
 
function doThrow (text)
 
function assertFalse (aTest, aMessage)
 
function assertTrue (aTest, aMessage)
 
function assertEqual (aExpected, aActual, aMessage)
 
function assertNotEqual (aExpected, aActual, aMessage)
 
function assertExtension (aExtensionID)
 
function fail (aMessage)
 
function failNoThrow (aMessage)
 
function skip (aMessage)
 
function testPending ()
 
function testFinished ()
 
function log (s)
 
function getPlatform ()
 
function sleep (ms, suppressOutput)
 
function getTestServerPortNumber ()
 
function StringArrayEnumerator (aArray)
 
function ExtensionSchemeMatcher (aExtensions, aSchemes)
 
function loadData (databaseGuid, databaseLocation)
 
function readFile (fileName)
 
function createLibrary (databaseGuid, databaseLocation, init)
 
function assertArraysEqual (a1, a2)
 
function assertSetsEqual (s1, s2)
 
function assertFilesEqual (aFile1, aFile2, aMessage)
 
function testFilesEqual (aFile1, aFile2)
 
function newAppRelativeFile (path)
 
function getTestFile (aFileName)
 
function newURI (aURLString)
 
function newFileURI (file)
 
function TestCase (config)
 

Variables

var _quit = false
 
var _fail = false
 
var _skip = false
 
var _running_event_loop = false
 
var _tests_pending = 0
 
var _test_name = "sbTestHarness"
 
var _test_comp = "testharness"
 
var _consoleService = null
 
var _extensionStates = null
 
const _TH_EXTENSION_DISABLED = "disabled"
 
const _TH_EXTENSION_NEEDS_RESTART = "needs-restart"
 
const _TH_EXTENSION_BAD = "bad"
 
const _TH_SKIP = {}
 
StringArrayEnumerator prototype hasMore
 
ExtensionSchemeMatcher prototype match
 

Function Documentation

function assertArraysEqual (   a1,
  a2 
)

Definition at line 613 of file head_songbird.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function assertEqual (   aExpected,
  aActual,
  aMessage 
)

Definition at line 142 of file head_songbird.js.

Here is the call graph for this function:

function assertExtension (   aExtensionID)

Definition at line 162 of file head_songbird.js.

Here is the call graph for this function:

function assertFalse (   aTest,
  aMessage 
)

Definition at line 131 of file head_songbird.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function assertFilesEqual (   aFile1,
  aFile2,
  aMessage 
)

Definition at line 634 of file head_songbird.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function assertNotEqual (   aExpected,
  aActual,
  aMessage 
)

Definition at line 149 of file head_songbird.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function assertSetsEqual (   s1,
  s2 
)

Definition at line 621 of file head_songbird.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function assertTrue (   aTest,
  aMessage 
)

Definition at line 138 of file head_songbird.js.

Here is the call graph for this function:

function createLibrary (   databaseGuid,
  databaseLocation,
  init 
)

Definition at line 570 of file head_songbird.js.

Here is the call graph for this function:

function doFail (   text)

Definition at line 118 of file head_songbird.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function doMain ( )

Definition at line 91 of file head_songbird.js.

function doQuit ( )

Definition at line 106 of file head_songbird.js.

Here is the caller graph for this function:

function doThrow (   text)

Definition at line 126 of file head_songbird.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function doTimeout (   delay,
  func 
)

Definition at line 86 of file head_songbird.js.

Here is the caller graph for this function:

function dumpStack ( )

Definition at line 110 of file head_songbird.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function ExtensionSchemeMatcher (   aExtensions,
  aSchemes 
)

Definition at line 417 of file head_songbird.js.

function fail (   aMessage)

Definition at line 310 of file head_songbird.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function failNoThrow (   aMessage)

Definition at line 315 of file head_songbird.js.

Here is the call graph for this function:

function getPlatform ( )

Definition at line 354 of file head_songbird.js.

function getTestFile (   aFileName)

Return an nsIFile for the test file specified by aFileName within the unit test's test harness directory.

Parameters
aFileNameName of test file to get.

Definition at line 700 of file head_songbird.js.

Here is the call graph for this function:

function getTestServerPortNumber ( )

Definition at line 376 of file head_songbird.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function loadData (   databaseGuid,
  databaseLocation 
)

Definition at line 457 of file head_songbird.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function log (   s)

Definition at line 350 of file head_songbird.js.

function newAppRelativeFile (   path)

Definition at line 678 of file head_songbird.js.

Here is the caller graph for this function:

function newFileURI (   file)

Definition at line 726 of file head_songbird.js.

Here is the caller graph for this function:

function newURI (   aURLString)

Makes a new URI from a url string

Definition at line 707 of file head_songbird.js.

Here is the caller graph for this function:

function readFile (   fileName)

Definition at line 542 of file head_songbird.js.

Here is the caller graph for this function:

function skip (   aMessage)

Definition at line 321 of file head_songbird.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function sleep (   ms,
  suppressOutput 
)

Definition at line 359 of file head_songbird.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function StringArrayEnumerator (   aArray)

Definition at line 397 of file head_songbird.js.

function TestCase (   config)

Helper object to wrap test cases with setup (pre) and cleanup (post) functions. Also provides object stubbing utilities.

Example:

var testConfig = { desc: "a rockin' test", pre: function(playlist) { this.stub(playlist, 'getNextSong', function () { return null; }); }, exec: function(playlist) { assertEqual(this.expected, playlist._canDrop(), this.desc); }, post: function (playlist) { doSomePostProcessing(); }, expected: false };

var playlist = makeMeAPlaylist(); // here, playlist.getNextSong() has its original behavior var testCase = new TestCase(testConfig); // Prior to execution of the test case, playlist.getNextSong() will // be modified to invoke the stubbed function testCase.run([playlist]); // here, playlist.getNextSong() has its original behavior again

Definition at line 769 of file head_songbird.js.

Here is the caller graph for this function:

function testFilesEqual (   aFile1,
  aFile2 
)

Definition at line 641 of file head_songbird.js.

Here is the caller graph for this function:

function testFinished ( )

Definition at line 344 of file head_songbird.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function testPending ( )

Definition at line 329 of file head_songbird.js.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

var _consoleService = null

Definition at line 64 of file head_songbird.js.

var _extensionStates = null

Definition at line 70 of file head_songbird.js.

var _fail = false

Definition at line 58 of file head_songbird.js.

var _quit = false

Definition at line 57 of file head_songbird.js.

var _running_event_loop = false

Definition at line 60 of file head_songbird.js.

var _skip = false

Definition at line 59 of file head_songbird.js.

var _test_comp = "testharness"

Definition at line 63 of file head_songbird.js.

var _test_name = "sbTestHarness"

Definition at line 62 of file head_songbird.js.

var _tests_pending = 0

Definition at line 61 of file head_songbird.js.

const _TH_EXTENSION_BAD = "bad"

Definition at line 80 of file head_songbird.js.

const _TH_EXTENSION_DISABLED = "disabled"

Definition at line 73 of file head_songbird.js.

const _TH_EXTENSION_NEEDS_RESTART = "needs-restart"

Definition at line 77 of file head_songbird.js.

const _TH_SKIP = {}

Definition at line 84 of file head_songbird.js.

Initial value:
= function() {
return this._current < this._array.length;
}
StringArrayEnumerator.prototype.getNext = function() {
return this._array[this._current++];
}
StringArrayEnumerator.prototype.QueryInterface = function(iid) {
if (!iid.equals(Components.interfaces.nsIStringEnumerator) &&
!iid.equals(Components.interfaces.nsISupports))
throw Components.results.NS_ERROR_NO_INTERFACE;
return this;
}
function StringArrayEnumerator(aArray)

Definition at line 402 of file head_songbird.js.

Definition at line 422 of file head_songbird.js.