33 var playlistWriter =
Cc[
"@songbirdnest.com/Songbird/PlaylistWriter/M3U;1"]
34 .createInstance(
Ci.sbIPlaylistWriter);
36 var
ioService =
Cc[
"@mozilla.org/network/io-service;1"]
37 .getService(
Ci.nsIIOService);
38 var temporaryFileService =
39 Cc[
"@songbirdnest.com/Songbird/TemporaryFileService;1"]
40 .getService(
Ci.sbITemporaryFileService);
41 var testDir = temporaryFileService.createFile(
Ci.nsIFile.DIRECTORY_TYPE);
45 var item1File = testDir.clone();
46 item1File.append(
"item1.mp3");
47 var item1 = library.createMediaItem(ioService.newFileURI(item1File));
48 testMediaList.add(item1);
50 var item2File = testDir.clone();
51 item2File.append(
"item2Dir");
52 item2File.append(
"item2.mp3");
53 var item2 = library.createMediaItem(ioService.newFileURI(item2File));
54 testMediaList.add(item2);
56 var playlistFile = testDir.clone();
57 playlistFile.append(
"playlist1.m3u");
59 playlistWriter.write(playlistFile, testMediaList,
"");
function getFile(fileName)
function assertFilesEqual(aFile1, aFile2, aMessage)
function createLibrary(databaseGuid, databaseLocation)