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 assertArraysEqual | ( | a1, | |
| a2 | |||
| ) |
Definition at line 613 of file head_songbird.js.
| function assertEqual | ( | aExpected, | |
| aActual, | |||
| aMessage | |||
| ) |
| function assertExtension | ( | aExtensionID | ) |
| function assertFalse | ( | aTest, | |
| aMessage | |||
| ) |
Definition at line 131 of file head_songbird.js.
| function assertFilesEqual | ( | aFile1, | |
| aFile2, | |||
| aMessage | |||
| ) |
Definition at line 634 of file head_songbird.js.
| function assertNotEqual | ( | aExpected, | |
| aActual, | |||
| aMessage | |||
| ) |
Definition at line 149 of file head_songbird.js.
| function assertSetsEqual | ( | s1, | |
| s2 | |||
| ) |
Definition at line 621 of file head_songbird.js.
| function assertTrue | ( | aTest, | |
| aMessage | |||
| ) |
| function createLibrary | ( | databaseGuid, | |
| databaseLocation, | |||
| init | |||
| ) |
| function doFail | ( | text | ) |
Definition at line 118 of file head_songbird.js.
| function doMain | ( | ) |
Definition at line 91 of file head_songbird.js.
| function doQuit | ( | ) |
| function doThrow | ( | text | ) |
Definition at line 126 of file head_songbird.js.
| function doTimeout | ( | delay, | |
| func | |||
| ) |
| function dumpStack | ( | ) |
Definition at line 110 of file head_songbird.js.
| 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.
| function failNoThrow | ( | aMessage | ) |
| 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.
| aFileName | Name of test file to get. |
Definition at line 700 of file head_songbird.js.
| function getTestServerPortNumber | ( | ) |
Definition at line 376 of file head_songbird.js.
| function loadData | ( | databaseGuid, | |
| databaseLocation | |||
| ) |
Definition at line 457 of file head_songbird.js.
| function log | ( | s | ) |
Definition at line 350 of file head_songbird.js.
| function newAppRelativeFile | ( | path | ) |
| function newFileURI | ( | file | ) |
| function newURI | ( | aURLString | ) |
Makes a new URI from a url string
Definition at line 707 of file head_songbird.js.
| function readFile | ( | fileName | ) |
| function skip | ( | aMessage | ) |
Definition at line 321 of file head_songbird.js.
| function sleep | ( | ms, | |
| suppressOutput | |||
| ) |
Definition at line 359 of file head_songbird.js.
| 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.
| function testFilesEqual | ( | aFile1, | |
| aFile2 | |||
| ) |
| function testFinished | ( | ) |
Definition at line 344 of file head_songbird.js.
| function testPending | ( | ) |
Definition at line 329 of file head_songbird.js.
| 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.
| StringArrayEnumerator prototype hasMore |
Definition at line 402 of file head_songbird.js.
Definition at line 422 of file head_songbird.js.