Bug 1529312 - Allow DontCheckDefaultBrower policy to be false r=Felipe
Differential Revision: https://phabricator.services.mozilla.com/D20525
This commit is contained in:
@@ -485,7 +485,7 @@ var Policies = {
|
||||
|
||||
"DontCheckDefaultBrowser": {
|
||||
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");
|
||||
});
|
||||
|
||||
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");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user