Commit 222ab561 authored by Punam Dahiya's avatar Punam Dahiya
Browse files

Bug 1706746 - New user onboarding - Remove urlbar focus by default r=andreio a=RyanVM

Removes focus from address bar on about:welcome, patch will be uplifted to 89 and ride along with a dot release in 88

Differential Revision: https://phabricator.services.mozilla.com/D113014
parent 4292b358
...@@ -1471,7 +1471,7 @@ pref("trailhead.firstrun.newtab.triplets", ""); ...@@ -1471,7 +1471,7 @@ pref("trailhead.firstrun.newtab.triplets", "");
pref("browser.aboutwelcome.enabled", true); pref("browser.aboutwelcome.enabled", true);
// Used to set multistage welcome UX // Used to set multistage welcome UX
pref("browser.aboutwelcome.screens", ""); pref("browser.aboutwelcome.screens", "");
pref("browser.aboutwelcome.skipFocus", false); pref("browser.aboutwelcome.skipFocus", true);
pref("browser.aboutwelcome.design", ""); pref("browser.aboutwelcome.design", "");
// The pref that controls if the What's New panel is enabled. // The pref that controls if the What's New panel is enabled.
......
...@@ -55,10 +55,10 @@ async function openAboutWelcomeBrowserWindow() { ...@@ -55,10 +55,10 @@ async function openAboutWelcomeBrowserWindow() {
add_task(async function test_multistage_default() { add_task(async function test_multistage_default() {
let win = await openAboutWelcomeBrowserWindow(); let win = await openAboutWelcomeBrowserWindow();
Assert.ok(win.gURLBar.focused, "Focus should be on awesome bar"); Assert.ok(!win.gURLBar.focused, "Focus should not be on awesome bar");
Assert.ok( Assert.ok(
win.gURLBar.hasAttribute("focused"), !win.gURLBar.hasAttribute("focused"),
"Has focused attribute on urlBar" "No focused attribute on urlBar"
); );
registerCleanupFunction(async () => { registerCleanupFunction(async () => {
...@@ -68,6 +68,7 @@ add_task(async function test_multistage_default() { ...@@ -68,6 +68,7 @@ add_task(async function test_multistage_default() {
add_task(async function test_multistage_without_skipFocus() { add_task(async function test_multistage_without_skipFocus() {
await setAboutWelcomeOverrideContent(JSON.stringify(TEST_MULTISTAGE_JSON)); await setAboutWelcomeOverrideContent(JSON.stringify(TEST_MULTISTAGE_JSON));
await pushPrefs([ABOUT_WELCOME_FOCUS_PREF, false]);
let win = await openAboutWelcomeBrowserWindow(); let win = await openAboutWelcomeBrowserWindow();
Assert.ok(win.gURLBar.focused, "Focus should be on awesome bar"); Assert.ok(win.gURLBar.focused, "Focus should be on awesome bar");
Assert.ok( Assert.ok(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment