31 Components.utils.import(
"resource://app/jsmodules/sbProperties.jsm");
37 Components.classes[
"@mozilla.org/system-info;1"]
38 .getService(Components.interfaces.nsIPropertyBag2);
39 platform = sysInfo.getProperty(
"name");
42 dump(
"System-info not available, trying the user agent string.\n");
43 var user_agent = navigator.userAgent;
44 if (user_agent.indexOf(
"Windows") != -1)
45 platform =
"Windows_NT";
46 else if (user_agent.indexOf(
"Mac OS X") != -1)
48 else if (user_agent.indexOf(
"Linux") != -1)
50 else if (user_agent.indexOf(
"SunOS") != -1)
63 folder.copyTo(tempFolder, tempName);
64 folder = tempFolder.clone();
65 folder.append(tempName);
77 var folder = optionalLocation ? optionalLocation :
getTempFolder();
78 file.copyTo(folder, tempName);
79 file = folder.clone();
80 file.append(tempName);
94 gTempFolder = Components.classes[
"@mozilla.org/file/directory_service;1"]
95 .getService(Components.interfaces.nsIProperties)
96 .get(
"TmpD", Components.interfaces.nsIFile);
97 gTempFolder.append(
"songbird_clipboardhelper_tests.tmp");
98 gTempFolder.createUnique(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0777);
108 if (gTempFolder && gTempFolder.exists()) {
109 gTempFolder.remove(
true);
111 log(
"\n\n\nClipboard Helper Test may not have performed cleanup. Temp files may exist.\n\n\n");
function getCopyOfFile(file, tempName, optionalLocation)
function assertNotEqual(aExpected, aActual, aMessage)
function getCopyOfFolder(folder, tempName)
function assertEqual(aExpected, aActual, aMessage)
function removeTempFolder()