Bug 1622474 - Enabled new About:Welcome experience by default; turned on dynamic triplets r=k88hudson

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Punam Dahiya 2020-03-23 19:51:57 +00:00
Родитель c1c042cab7
Коммит b38003f702
4 изменённых файлов: 14 добавлений и 2 удалений

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

@ -1317,10 +1317,10 @@ pref("browser.newtabpage.activity-stream.discoverystream.personalization.modelKe
pref("browser.newtabpage.activity-stream.improvesearch.handoffToAwesomebar", false);
#endif
pref("trailhead.firstrun.branches", "");
pref("trailhead.firstrun.branches", "join-dynamic");
// Separate about welcome
pref("browser.aboutwelcome.enabled", false);
pref("browser.aboutwelcome.enabled", true);
// Temporary utility to unblock testing on about:welcome experiment variations
pref("browser.aboutwelcome.temp.testExperiment.slug", "");
pref("browser.aboutwelcome.temp.testExperiment.branch", "control");

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

@ -5,12 +5,15 @@ const { ASRouter } = ChromeUtils.import(
);
const BRANCH_PREF = "trailhead.firstrun.branches";
const SIMPLIFIED_WELCOME_ENABLED_PREF = "browser.aboutwelcome.enabled";
/**
* Sets the trailhead branch pref to the passed value.
*/
async function setTrailheadBranch(value) {
Services.prefs.setCharPref(BRANCH_PREF, value);
// Set about:welcome to use trailhead flow
Services.prefs.setBoolPref(SIMPLIFIED_WELCOME_ENABLED_PREF, false);
// Reset trailhead so it loads the new branch.
Services.prefs.clearUserPref("trailhead.firstrun.didSeeAboutWelcome");
@ -18,6 +21,7 @@ async function setTrailheadBranch(value) {
registerCleanupFunction(() => {
Services.prefs.clearUserPref(BRANCH_PREF);
Services.prefs.clearUserPref(SIMPLIFIED_WELCOME_ENABLED_PREF);
});
}

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

@ -9,6 +9,7 @@ const { AttributionCode } = ChromeUtils.import(
);
const BRANCH_PREF = "trailhead.firstrun.branches";
const SIMPLIFIED_WELCOME_ENABLED_PREF = "browser.aboutwelcome.enabled";
async function setRTAMOOnboarding() {
await ASRouter.forceAttribution({
@ -25,6 +26,8 @@ async function setRTAMOOnboarding() {
);
Services.prefs.setCharPref(BRANCH_PREF, "join-supercharge");
// Set about:welcome to use trailhead flow
Services.prefs.setBoolPref(SIMPLIFIED_WELCOME_ENABLED_PREF, false);
// Reset trailhead so it loads the new branch.
Services.prefs.clearUserPref("trailhead.firstrun.didSeeAboutWelcome");
@ -47,6 +50,7 @@ async function setRTAMOOnboarding() {
);
env.set("XPCSHELL_TEST_PROFILE_DIR", "testing");
Services.prefs.clearUserPref(BRANCH_PREF);
Services.prefs.clearUserPref(SIMPLIFIED_WELCOME_ENABLED_PREF);
await AttributionCode.deleteFileAsync();
AttributionCode._clearCache();
});

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

@ -37,10 +37,12 @@ const DOWNLOADS_URL =
const SEPARATE_PRIVILEGED_CONTENT_PROCESS_PREF =
"browser.tabs.remote.separatePrivilegedContentProcess";
const ACTIVITY_STREAM_DEBUG_PREF = "browser.newtabpage.activity-stream.debug";
const SIMPLIFIED_WELCOME_ENABLED_PREF = "browser.aboutwelcome.enabled";
function cleanup() {
Services.prefs.clearUserPref(SEPARATE_PRIVILEGED_CONTENT_PROCESS_PREF);
Services.prefs.clearUserPref(ACTIVITY_STREAM_DEBUG_PREF);
Services.prefs.clearUserPref(SIMPLIFIED_WELCOME_ENABLED_PREF);
AboutNewTab.resetNewTabURL();
}
@ -286,6 +288,8 @@ addTestsWithPrivilegedContentProcessPref(async function test_default_url() {
});
addTestsWithPrivilegedContentProcessPref(async function test_welcome_url() {
// Set about:welcome to use trailhead flow
Services.prefs.setBoolPref(SIMPLIFIED_WELCOME_ENABLED_PREF, false);
Assert.equal(
aboutNewTabService.welcomeURL,
ACTIVITY_STREAM_URL,