34 while(enumerator.hasMoreElements()) {
35 var item = enumerator.getNext();
45 var enumerator = libraryManager.getLibraries();
51 libraryManager.registerLibrary(library1,
false);
52 enumerator = libraryManager.getLibraries();
55 libraryManager.unregisterLibrary(library1);
56 enumerator = libraryManager.getLibraries();
59 libraryManager.registerLibrary(library1,
false);
60 libraryManager.registerLibrary(library1,
false);
61 enumerator = libraryManager.getLibraries();
64 libraryManager.unregisterLibrary(library1);
65 libraryManager.unregisterLibrary(library1);
66 enumerator = libraryManager.getLibraries();
71 libraryManager.registerLibrary(library1,
false);
72 libraryManager.registerLibrary(library2,
false);
73 enumerator = libraryManager.getLibraries();
76 var getLibraryException;
78 var testLibrary = libraryManager.getLibrary(
"whippersnapper");
80 getLibraryException = e;
82 assertEqual(getLibraryException.result,
Cr.NS_ERROR_NOT_AVAILABLE);
84 var testLibrary = libraryManager.getLibrary(library1.guid);
87 var mainLibrary = libraryManager.mainLibrary;
90 enumerator = libraryManager.getStartupLibraries();
95 libraryManager.registerLibrary(library3,
true);
96 enumerator = libraryManager.getStartupLibraries();
99 libraryManager.setLibraryLoadsAtStartup(library3,
false);
100 enumerator = libraryManager.getStartupLibraries();
103 libraryManager.setLibraryLoadsAtStartup(library2,
true);
104 assertTrue(libraryManager.getLibraryLoadsAtStartup(library2));
106 enumerator = libraryManager.getStartupLibraries();
109 libraryManager.setLibraryLoadsAtStartup(library2,
false);
110 assertFalse(libraryManager.getLibraryLoadsAtStartup(library2));
112 enumerator = libraryManager.getStartupLibraries();
function countEnumeratedItems(enumerator)
Test file.
function assertTrue(aTest, aMessage)
function assertEqual(aExpected, aActual, aMessage)
getService(Ci.sbIFaceplateManager)
function runTest()
Advanced DataRemote unit tests.
function createLibrary(databaseGuid, databaseLocation)
function assertFalse(aTest, aMessage)