Bug 1457146 - Add policy for turning the new tab page off r=Felipe,flod

Differential Revision: https://phabricator.services.mozilla.com/D25675

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Michael Kaply 2019-04-09 19:56:58 +00:00
Родитель 093defcb13
Коммит 7da5caf32f
4 изменённых файлов: 22 добавлений и 0 удалений

Просмотреть файл

@ -680,6 +680,12 @@ var Policies = {
},
},
"NewTabPage": {
onBeforeAddons(manager, param) {
setAndLockPref("browser.newtabpage.enabled", param);
},
},
"NoDefaultBookmarks": {
onProfileAfterChange(manager, param) {
if (param) {

Просмотреть файл

@ -393,6 +393,10 @@
"type": "boolean"
},
"NewTabPage": {
"type": "boolean"
},
"NoDefaultBookmarks": {
"type": "boolean"
},

Просмотреть файл

@ -268,6 +268,16 @@ const POLICIES_TESTS = [
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features": false,
},
},
// POLICY: NewTabPage
{
policies: {
"NewTabPage": false,
},
lockedPrefs: {
"browser.newtabpage.enabled": false,
},
},
];
add_task(async function test_policy_remember_passwords() {

Просмотреть файл

@ -99,6 +99,8 @@ policy-InstallAddonsPermission = Allow certain websites to install add-ons.
policy-NetworkPrediction = Enable or disable network prediction (DNS prefetching).
policy-NewTabPage = Enable or disable the New Tab page.
policy-NoDefaultBookmarks = Disable creation of the default bookmarks bundled with { -brand-short-name }, and the Smart Bookmarks (Most Visited, Recent Tags). Note: this policy is only effective if used before the first run of the profile.
policy-OfferToSaveLogins = Enforce the setting to allow { -brand-short-name } to offer to remember saved logins and passwords. Both true and false values are accepted.