37 var NUM_ITEMADD_LOOPS = 2;
41 gServer =
Cc[
"@mozilla.org/server/jshttp;1"].createInstance(
Ci.nsIHttpServer);
46 var prefix =
"http://localhost:" + port +
"/files/";
51 "file:///media/sdb1/steve/old/steve/fakemp3s/Sigur%20R%C3%B3s/%C3%81g%C3%A6tis%20Byrjun/1%20Intro.mp3",
52 "file:///media/sdb1/steve/old/steve/fakemp3s/Sigur%20R%C3%B3s/%C3%81g%C3%A6tis%20Byrjun/2%20Svefn-G-Englar.mp3",
53 "file:///media/sdb1/steve/old/steve/fakemp3s/Sigur%20R%C3%B3s/%C3%81g%C3%A6tis%20Byrjun/3%20Star%C3%A1lfur.mp3",
54 "file:///media/sdb1/steve/old/steve/fakemp3s/Sigur%20R%C3%B3s/%C3%81g%C3%A6tis%20Byrjun/4%20Flugufrelsarinn.mp3",
55 "file:///media/sdb1/steve/old/steve/fakemp3s/Sigur%20R%C3%B3s/%C3%81g%C3%A6tis%20Byrjun/5%20Ny%20Batteri.mp3",
56 prefix +
"MP3_ID3v1.mp3",
57 prefix +
"MP3_ID3v23.mp3",
62 .getService(Components.interfaces.sbIFileMetadataService);
64 for (var
i = 0;
i < NUM_JOBS;
i++) {
65 var a = Components.classes[
"@songbirdnest.com/moz/xpcom/threadsafe-array;1"]
66 .createInstance(Components.interfaces.nsIMutableArray);
67 for (var k = 0; k < NUM_ITEMADD_LOOPS; k++) {
68 for (var j = 0; j < urls.length; j++) {
69 a.appendElement(library.createMediaItem(
newURI(urls[j]),
null,
true),
false);
78 log(
"length = " + a.length +
" count = " +
count);
86 if (job.status == Components.interfaces.sbIJobProgress.STATUS_RUNNING) {
101 var
file =
Cc[
"@mozilla.org/file/directory_service;1"]
102 .getService(
Ci.nsIProperties)
103 .get(
"resource:app",
Ci.nsIFile);
105 file.append(
"testharness");
106 file.append(
"metadatamanager");
107 file.append(fileName);
function runTest()
Advanced DataRemote unit tests.
function newURI(aURLString)
function getFile(fileName)
function getTestServerPortNumber()
_getSelectedPageStyle s i
var gFileMetadataService
Test file.