33 Components.utils.import(
"resource://app/jsmodules/sbProperties.jsm");
40 assertTrue(library.contentSrc.schemeIs(
"file"));
41 assertEqual(library.getProperty(SBProperties.hidden),
"0");
43 var uniqueString = (
new Date()).getTime();
44 library.setProperty(SBProperties.contentType, uniqueString);
45 assertEqual(library.getProperty(SBProperties.contentType), uniqueString);
46 library.setProperty(SBProperties.albumName, uniqueString);
47 assertEqual(library.getProperty(SBProperties.albumName), uniqueString);
56 var directory =
Cc[
"@mozilla.org/file/directory_service;1"].
58 get(
"ProfD",
Ci.nsIFile);
59 directory.append(
"db");
61 var dest = directory.clone();
62 dest.append(
"test_library_properties2.db");
67 var src = directory.clone();
68 src.append(
"test_library_properties.db");
69 src.copyTo(directory, dest.leafName);
74 assertTrue(library2.contentSrc.schemeIs(
"file"));
75 assertEqual(library2.getProperty(SBProperties.hidden),
"0");
76 assertEqual(library2.getProperty(SBProperties.contentType), uniqueString);
77 assertEqual(library2.getProperty(SBProperties.albumName), uniqueString);
function assertTrue(aTest, aMessage)
function assertEqual(aExpected, aActual, aMessage)
getService(Ci.sbIFaceplateManager)
function runTest()
Test file.
function createLibrary(databaseGuid, databaseLocation)