mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1167627 - Part 4: Use mozinfo in uriloader/.
This commit is contained in:
parent
14e3e2945e
commit
0f107a35f9
@ -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 ---
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user