mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 17:25:36 +00:00
Bug 1529312 - Allow DontCheckDefaultBrower policy to be false r=Felipe
Differential Revision: https://phabricator.services.mozilla.com/D20525 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
9b8862951b
commit
288d46045d
@ -485,7 +485,7 @@ var Policies = {
|
|||||||
|
|
||||||
"DontCheckDefaultBrowser": {
|
"DontCheckDefaultBrowser": {
|
||||||
onBeforeUIStartup(manager, param) {
|
onBeforeUIStartup(manager, param) {
|
||||||
setAndLockPref("browser.shell.checkDefaultBrowser", false);
|
setAndLockPref("browser.shell.checkDefaultBrowser", !param);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -25,3 +25,18 @@ add_task(async function test_default_browser_check() {
|
|||||||
|
|
||||||
is(ShellService.shouldCheckDefaultBrowser, false, "Policy is enforced");
|
is(ShellService.shouldCheckDefaultBrowser, false, "Policy is enforced");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
add_task(async function test_default_browser_check() {
|
||||||
|
await setupPolicyEngineWithJson({
|
||||||
|
"policies": {
|
||||||
|
"DontCheckDefaultBrowser": false,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
is(ShellService.shouldCheckDefaultBrowser, true, "Policy changed it to check");
|
||||||
|
|
||||||
|
// Try to change it to false and check that it doesn't take effect
|
||||||
|
ShellService.shouldCheckDefaultBrowser = false;
|
||||||
|
|
||||||
|
is(ShellService.shouldCheckDefaultBrowser, true, "Policy is enforced");
|
||||||
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user