mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 847922 - fix for test_handlerService due to default mailto handler on Win8. r=dolske
This commit is contained in:
parent
3eb29a5a01
commit
8774ab6b54
@ -26,14 +26,14 @@ function run_test() {
|
||||
|
||||
const rootPrefBranch = prefSvc.getBranch("");
|
||||
|
||||
let isWin7OrHigher = false;
|
||||
let isWin7 = false;
|
||||
let isWindows = ("@mozilla.org/windows-registry-key;1" in Components.classes);
|
||||
if (isWindows) {
|
||||
try {
|
||||
let version = Cc["@mozilla.org/system-info;1"]
|
||||
.getService(Ci.nsIPropertyBag2)
|
||||
.getProperty("version");
|
||||
isWin7OrHigher = (parseFloat(version) >= 6.1);
|
||||
isWin7 = (parseFloat(version) == 6.1);
|
||||
} catch (ex) { }
|
||||
}
|
||||
|
||||
@ -151,7 +151,7 @@ function run_test() {
|
||||
do_check_eq(0, protoInfo.possibleApplicationHandlers.length);
|
||||
|
||||
// Win7 doesn't have a default mailto: handler
|
||||
if (isWin7OrHigher)
|
||||
if (isWin7)
|
||||
do_check_true(protoInfo.alwaysAskBeforeHandling);
|
||||
else
|
||||
do_check_false(protoInfo.alwaysAskBeforeHandling);
|
||||
@ -166,7 +166,7 @@ function run_test() {
|
||||
// the pref is true, the value in RDF is false. The injected mailto handler
|
||||
// carried over the default pref value, and so when we set the pref above
|
||||
// to true it's ignored.
|
||||
if (isWin7OrHigher)
|
||||
if (isWin7)
|
||||
do_check_true(protoInfo.alwaysAskBeforeHandling);
|
||||
else
|
||||
do_check_false(protoInfo.alwaysAskBeforeHandling);
|
||||
|
Loading…
Reference in New Issue
Block a user