Bug 1167627 - Part 1: Use mozinfo in dom/. r=mrbkap

This commit is contained in:
Hiroyuki Ikezoe 2015-10-11 21:47:00 +02:00
parent 701c985137
commit 4760d74c79
5 changed files with 9 additions and 15 deletions

View File

@ -7,10 +7,11 @@ var LB;
function run_test() {
if(("@mozilla.org/windows-registry-key;1" in C) || ("nsILocalFileOS2" in I))
if (mozinfo.os == "win") {
LB = "\r\n";
else
} else {
LB = "\n";
}
for (var i = 0; i < tests.length && tests[i]; ++i) {
tests[i].call();

View File

@ -7,10 +7,9 @@ var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
Cu.import("resource://gre/modules/Promise.jsm");
const gIsWindows = ("@mozilla.org/windows-registry-key;1" in Cc);
const gIsOSX = ("nsILocalFileMac" in Ci);
const gIsLinux = ("@mozilla.org/gnome-gconf-service;1" in Cc) ||
("@mozilla.org/gio-service;1" in Cc);
const gIsWindows = mozinfo.os == "win";
const gIsOSX = mozinfo.os == "mac";
const gIsLinux = mozinfo.os == "linux";
const gDirSvc = Cc["@mozilla.org/file/directory_service;1"].getService(Ci.nsIProperties);
// Finds the test plugin library

View File

@ -6,9 +6,7 @@
Components.utils.import("resource://gre/modules/Services.jsm");
// Plugin registry uses different field delimeters on different platforms
var DELIM = ":";
if ("@mozilla.org/windows-registry-key;1" in Components.classes)
DELIM = "|";
var DELIM = mozinfo.os == "win" ? "|" : ":";
var gProfD = do_get_profile_startup();

View File

@ -6,9 +6,7 @@
Components.utils.import("resource://gre/modules/Services.jsm");
// Plugin registry uses different field delimeters on different platforms
var DELIM = ":";
if ("@mozilla.org/windows-registry-key;1" in Components.classes)
DELIM = "|";
var DELIM = mozinfo.os == "win" ? "|" : ":";
var gProfD = do_get_profile_startup();

View File

@ -6,9 +6,7 @@
Components.utils.import("resource://gre/modules/Services.jsm");
// Plugin registry uses different field delimeters on different platforms
var DELIM = ":";
if ("@mozilla.org/windows-registry-key;1" in Components.classes)
DELIM = "|";
var DELIM = mozinfo.os == "win" ? "|" : ":";
var gProfD = do_get_profile_startup();