Bug 1167627 - Part 4: Use mozinfo in uriloader/.

This commit is contained in:
Hiroyuki Ikezoe 2015-08-25 14:51:00 +02:00
parent 14e3e2945e
commit 0f107a35f9
3 changed files with 5 additions and 8 deletions

View File

@ -13,7 +13,7 @@ function run_test() {
// If this test is not running on the Windows platform, stop now, before
// calling XPCOMUtils.generateQI during the MockWindowsRegKey declaration.
if (!("@mozilla.org/windows-registry-key;1" in Components.classes))
if (mozinfo.os != "win")
return;
// --- Modified nsIWindowsRegKey implementation ---

View File

@ -27,8 +27,7 @@ function run_test() {
const rootPrefBranch = prefSvc.getBranch("");
let noMailto = false;
let isWindows = ("@mozilla.org/windows-registry-key;1" in Components.classes);
if (isWindows) {
if (mozinfo.os == "win") {
// Check mailto handler from registry.
// If registry entry is nothing, no mailto handler
let regSvc = Cc["@mozilla.org/windows-registry-key;1"].
@ -44,8 +43,7 @@ function run_test() {
regSvc.close();
}
let isLinux = ("@mozilla.org/gio-service;1" in Components.classes);
if (isLinux) {
if (mozinfo.os == "linux") {
// Check mailto handler from GIO
// If there isn't one, then we have no mailto handler
let gIOSvc = Cc["@mozilla.org/gio-service;1"].
@ -463,7 +461,7 @@ function run_test() {
do_check_eq(lolType, "application/lolcat");
// test mailcap entries with needsterminal are ignored on non-Windows non-Mac.
if (!("@mozilla.org/windows-registry-key;1" in Cc) && !("nsILocalFileMac" in Ci)) {
if (mozinfo.os != "win" && mozinfo.os != "mac") {
env.set('PERSONAL_MAILCAP', do_get_file('mailcap').path);
handlerInfo = mimeSvc.getFromTypeAndExtension("text/plain", null);
do_check_eq(handlerInfo.preferredAction, Ci.nsIHandlerInfo.useSystemDefault);

View File

@ -63,8 +63,7 @@ function checkFile() {
}
function run_test() {
var isOSX = ("nsILocalFileMac" in Components.interfaces);
if (isOSX) {
if (mozinfo.os == "mac") {
dump("INFO | test_punycodeURIs.js | Skipping test on mac, bug 599475")
return;
}