Bug 1649883 - Fix user pref for pocket toggle off. r=gvn,remote-protocol-reviewers,perftest-reviewers,maja_zf

Differential Revision: https://phabricator.services.mozilla.com/D82773
This commit is contained in:
Scott 2020-07-15 14:51:02 +00:00
parent 897775d6e4
commit 2bcdc17387
8 changed files with 7 additions and 11 deletions

View File

@ -1052,7 +1052,7 @@ var Policies = {
}
if ("Pocket" in param) {
setDefaultPref(
"browser.newtabpage.activity-stream.feeds.section.topstories",
"browser.newtabpage.activity-stream.feeds.system.topstories",
param.Pocket,
locked
);

View File

@ -556,7 +556,7 @@ const POLICIES_TESTS = [
},
lockedPrefs: {
"browser.newtabpage.activity-stream.feeds.snippets": false,
"browser.newtabpage.activity-stream.feeds.section.topstories": false,
"browser.newtabpage.activity-stream.feeds.system.topstories": false,
},
},

View File

@ -607,13 +607,6 @@ const FEEDS_DATA = [
"System pref that fetches content recommendations from a configurable content provider",
// Dynamically determine if Pocket should be shown for a geo / locale
getValue: ({ geo, locale }) => {
const userPreffedStoriesBool = Services.prefs.getBoolPref(
"browser.newtabpage.activity-stream.feeds.section.topstories",
false
);
if (!userPreffedStoriesBool) {
return false;
}
const preffedRegionsString =
Services.prefs.getStringPref(REGION_STORIES_CONFIG) || "";
const preffedRegions = preffedRegionsString.split(",").map(s => s.trim());

View File

@ -10,6 +10,7 @@ prefs =
browser.startup.homepage.abouthome_cache.testing=true
browser.startup.page=1
browser.newtabpage.activity-stream.discoverystream.endpoints=data:
browser.newtabpage.activity-stream.feeds.system.topstories=true
browser.newtabpage.activity-stream.feeds.section.topstories=true
browser.newtabpage.activity-stream.feeds.system.topstories=true
browser.newtabpage.activity-stream.feeds.section.topstories.options={"provider_name":""}

View File

@ -10,6 +10,7 @@ prefs =
browser.newtabpage.activity-stream.debug=false
browser.newtabpage.activity-stream.discoverystream.enabled=true
browser.newtabpage.activity-stream.discoverystream.endpoints=data:
browser.newtabpage.activity-stream.feeds.system.topstories=true
browser.newtabpage.activity-stream.feeds.section.topstories=true
browser.newtabpage.activity-stream.feeds.section.topstories.options={"provider_name":""}

View File

@ -513,7 +513,7 @@ class FirefoxLauncher implements ProductLauncher {
// https://bugzilla.mozilla.org/show_bug.cgi?id=1543115
'browser.dom.window.dump.enabled': true,
// Disable topstories
'browser.newtabpage.activity-stream.feeds.section.topstories': false,
'browser.newtabpage.activity-stream.feeds.system.topstories': false,
// Always display a blank page
'browser.newtabpage.enabled': false,
// Background thumbnails in particular cause grief: and disabling

View File

@ -12,7 +12,7 @@ user_pref("browser.newtabpage.activity-stream.asrouter.providers.snippets", "[]"
user_pref("browser.newtabpage.activity-stream.asrouter.providers.message-groups", "[]");
user_pref("browser.newtabpage.activity-stream.asrouter.providers.whats-new-panel", "[]");
user_pref("browser.newtabpage.activity-stream.asrouter.providers.messaging-experiments", "[]");
user_pref("browser.newtabpage.activity-stream.feeds.section.topstories", false);
user_pref("browser.newtabpage.activity-stream.feeds.system.topstories", false);
user_pref("browser.newtabpage.activity-stream.feeds.snippets", false);
user_pref("browser.newtabpage.activity-stream.tippyTop.service.endpoint", "");
user_pref("browser.newtabpage.activity-stream.discoverystream.config", "[]");

View File

@ -1078,6 +1078,7 @@ class about_newtab_with_snippets(PageloaderTest):
"http://fakedomain/tests/about-newtab/snippets.json",\
"updateCycleInMs":14400000}',
'browser.newtabpage.activity-stream.feeds.snippets': True,
'browser.newtabpage.activity-stream.feeds.system.topstories': True,
'browser.newtabpage.activity-stream.feeds.section.topstories': True,
'browser.newtabpage.activity-stream.feeds.section.topstories.options':\
'{"provider_name":""}',