Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Applications
Tor Browser
Commits
a72b687b
Commit
a72b687b
authored
Jan 22, 2018
by
Felipe Gomes
Browse files
Bug 1429141 - Policy: Don't check if Firefox is the default browser on startup. r=Gijs
MozReview-Commit-ID: DMpGbNkhRN6
parent
fafa9a9a
Changes
5
Hide whitespace changes
Inline
Side-by-side
browser/components/enterprisepolicies/Policies.jsm
View file @
a72b687b
...
...
@@ -35,6 +35,12 @@ this.Policies = {
}
}
},
"dont_check_default_browser": {
onBeforeUIStartup(manager, param) {
setAndLockPref("browser.shell.checkDefaultBrowser", false);
}
}
};
/*
...
...
browser/components/enterprisepolicies/schemas/policies-schema.json
View file @
a72b687b
...
...
@@ -6,6 +6,14 @@
"description"
:
"Blocks access to the about:config page."
,
"first_available"
:
"60.0"
,
"type"
:
"boolean"
,
"enum"
:
[
true
]
},
"dont_check_default_browser"
:
{
"description"
:
"Don't check for the default browser on startup."
,
"first_available"
:
"60.0"
,
"type"
:
"boolean"
,
"enum"
:
[
true
]
}
...
...
browser/components/enterprisepolicies/tests/browser/browser.ini
View file @
a72b687b
...
...
@@ -3,6 +3,7 @@ prefs =
browser.policies.enabled
=
true
support-files
=
head.js
config_dont_check_default_browser.json
config_setAndLockPref.json
config_simple_policies.json
config_broken_json.json
...
...
@@ -11,3 +12,4 @@ support-files =
[browser_policies_setAndLockPref_API.js]
[browser_policies_simple_policies.js]
[browser_policies_validate_and_parse_API.js]
[browser_policy_default_browser_check.js]
browser/components/enterprisepolicies/tests/browser/browser_policy_default_browser_check.js
0 → 100644
View file @
a72b687b
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"
use strict
"
;
const
{
ShellService
}
=
Cu
.
import
(
"
resource:///modules/ShellService.jsm
"
,
{});
add_task
(
async
function
test_default_browser_check
()
{
ShellService
.
_checkedThisSession
=
false
;
// On a normal profile, the default is true. However, this gets set to false on the
// testing profile. Let's start with true for a sanity check.
ShellService
.
shouldCheckDefaultBrowser
=
true
;
is
(
ShellService
.
shouldCheckDefaultBrowser
,
true
,
"
Sanity check
"
);
await
setupPolicyEngineWithJson
(
"
config_dont_check_default_browser.json
"
);
is
(
ShellService
.
shouldCheckDefaultBrowser
,
false
,
"
Policy changed it to not check
"
);
// Try to change it to true and check that it doesn't take effect
ShellService
.
shouldCheckDefaultBrowser
=
true
;
is
(
ShellService
.
shouldCheckDefaultBrowser
,
false
,
"
Policy is enforced
"
);
});
browser/components/enterprisepolicies/tests/browser/config_dont_check_default_browser.json
0 → 100644
View file @
a72b687b
{
"policies"
:
{
"dont_check_default_browser"
:
true
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment