Bug 1934182 - Disable the restore session infobar by default in all tests r=sessionstore-reviewers,Gijs,dao,perftest-reviewers,sparky

- But reset the default value in the browser-mochitest-chrome session store suite.

Differential Revision: https://phabricator.services.mozilla.com/D230861
This commit is contained in:
Sam Foster
2024-12-11 18:02:53 +00:00
parent a4d0ae8da7
commit a15eb85904
4 changed files with 7 additions and 4 deletions

View File

@@ -37,6 +37,8 @@ prefs = [
"gfx.font_rendering.fallback.async=false", "gfx.font_rendering.fallback.async=false",
"browser.sessionstore.closedTabsFromAllWindows=true", "browser.sessionstore.closedTabsFromAllWindows=true",
"browser.sessionstore.closedTabsFromClosedWindows=true", "browser.sessionstore.closedTabsFromClosedWindows=true",
# Override the test default, allowing the session restore infobar to be shown if necessary
"browser.startup.couldRestoreSession.count=0",
] ]
["browser_aboutPrivateBrowsing.js"] ["browser_aboutPrivateBrowsing.js"]

View File

@@ -14,3 +14,7 @@ user_pref("extensions.formautofill.addresses.experiments.enabled", true);
// Turn off update // Turn off update
user_pref("app.update.disabledForTesting", true); user_pref("app.update.disabledForTesting", true);
// Browser restarts can cause the session restore suggestion to be shown when reusing a
// profile across a set of tests. Avoid showing this infobar by default.
user_pref("browser.startup.couldRestoreSession.count", -1);

View File

@@ -32,7 +32,6 @@ user_pref("browser.safebrowsing.provider.google4.updateURL", "http://127.0.0.1/s
user_pref("browser.safebrowsing.provider.mozilla.gethashURL", "http://127.0.0.1/safebrowsing-dummy/gethash"); user_pref("browser.safebrowsing.provider.mozilla.gethashURL", "http://127.0.0.1/safebrowsing-dummy/gethash");
user_pref("browser.safebrowsing.provider.mozilla.updateURL", "http://127.0.0.1/safebrowsing-dummy/update"); user_pref("browser.safebrowsing.provider.mozilla.updateURL", "http://127.0.0.1/safebrowsing-dummy/update");
user_pref("browser.shell.checkDefaultBrowser", false); user_pref("browser.shell.checkDefaultBrowser", false);
user_pref("browser.startup.couldRestoreSession.count", -1);
user_pref("browser.warnOnQuit", false); user_pref("browser.warnOnQuit", false);
user_pref("datareporting.healthreport.documentServerURI", "http://127.0.0.1/healthreport/"); user_pref("datareporting.healthreport.documentServerURI", "http://127.0.0.1/healthreport/");
user_pref("devtools.chrome.enabled", false); user_pref("devtools.chrome.enabled", false);

View File

@@ -8,8 +8,6 @@
user_pref("browser.newtabpage.enabled", false); user_pref("browser.newtabpage.enabled", false);
// Don't restore the last open set of tabs if the browser has crashed // Don't restore the last open set of tabs if the browser has crashed
user_pref("browser.sessionstore.resume_from_crash", false); user_pref("browser.sessionstore.resume_from_crash", false);
// Disable session restore infobar.
user_pref("browser.startup.couldRestoreSession.count", -1);
// Don't show the Bookmarks Toolbar on any tab (the above pref that // Don't show the Bookmarks Toolbar on any tab (the above pref that
// disables the New Tab Page ends up showing the toolbar on about:blank). // disables the New Tab Page ends up showing the toolbar on about:blank).
user_pref("browser.toolbars.bookmarks.visibility", "never"); user_pref("browser.toolbars.bookmarks.visibility", "never");