diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index 050258190e72..d1a4a86aa439 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -299,11 +299,6 @@ pref("browser.urlbar.suggest.bookmark", true); pref("browser.urlbar.suggest.openpage", true); pref("browser.urlbar.suggest.searches", true); -// Whether the user made a choice in the old search suggestions opt-in bar. -pref("browser.urlbar.userMadeSearchSuggestionsChoice", false); -// The suggestion opt-out hint will be hidden after being shown 4 times. -pref("browser.urlbar.timesBeforeHidingSuggestionsHint", 4); - // Limit the number of characters sent to the current search engine to fetch // suggestions. pref("browser.urlbar.maxCharsForSearchSuggestions", 20); diff --git a/browser/components/urlbar/tests/browser/browser_urlbarSearchFunction.js b/browser/components/urlbar/tests/browser/browser_urlbarSearchFunction.js index ed3a43d2348c..46043567bfd0 100644 --- a/browser/components/urlbar/tests/browser/browser_urlbarSearchFunction.js +++ b/browser/components/urlbar/tests/browser/browser_urlbarSearchFunction.js @@ -9,25 +9,14 @@ add_task(async function init() { // Run this in a new tab, to ensure all the locationchange notifications have // fired. let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser); - let which = gURLBar._whichSearchSuggestionsNotification || undefined; registerCleanupFunction(async function() { BrowserTestUtils.removeTab(tab); - // Reset the search suggestions notification. - if (which === undefined) { - delete gURLBar._whichSearchSuggestionsNotification; - } else { - gURLBar._whichSearchSuggestionsNotification = which; - } - Services.prefs.clearUserPref("timesBeforeHidingSuggestionsHint"); - gURLBar.handleRevert(); }); }); // Calls search() with a normal, non-"@engine" search-string argument. add_task(async function basic() { - let resetNotification = enableSearchSuggestionsNotification(); - gURLBar.blur(); gURLBar.search("basic"); ok(gURLBar.hasAttribute("focused"), "url bar is focused"); @@ -38,15 +27,11 @@ add_task(async function basic() { await UrlbarTestUtils.promisePopupClose(window, () => EventUtils.synthesizeKey("KEY_Escape") ); - - resetNotification(); }); // Calls search() with an "@engine" search engine alias so that the one-off -// search buttons and search-suggestions notification are disabled. +// search buttons are disabled. add_task(async function searchEngineAlias() { - let resetNotification = enableSearchSuggestionsNotification(); - gURLBar.blur(); await UrlbarTestUtils.promisePopupOpen(window, () => gURLBar.search("@example") @@ -60,9 +45,8 @@ add_task(async function searchEngineAlias() { EventUtils.synthesizeKey("KEY_Escape") ); - // Open the popup again (by doing another search) to make sure the - // notification and one-off buttons are shown -- i.e., that we didn't - // accidentally break them. + // Open the popup again (by doing another search) to make sure the one-off + // buttons are shown -- i.e., that we didn't accidentally break them. await UrlbarTestUtils.promisePopupOpen(window, () => gURLBar.search("not an engine alias") ); @@ -72,14 +56,10 @@ add_task(async function searchEngineAlias() { await UrlbarTestUtils.promisePopupClose(window, () => EventUtils.synthesizeKey("KEY_Escape") ); - - resetNotification(); }); // Calls search() with a restriction character. add_task(async function searchRestriction() { - let resetNotification = enableSearchSuggestionsNotification(); - gURLBar.blur(); await UrlbarTestUtils.promisePopupOpen(window, () => gURLBar.search(UrlbarTokenizer.RESTRICT.SEARCH) @@ -91,14 +71,10 @@ add_task(async function searchRestriction() { assertOneOffButtonsVisible(false); await UrlbarTestUtils.promisePopupClose(window); - - resetNotification(); }); // Calls search() twice with the same value. The popup should reopen. add_task(async function searchTwice() { - let resetNotification = enableSearchSuggestionsNotification(); - gURLBar.blur(); await UrlbarTestUtils.promisePopupOpen(window, () => gURLBar.search("test")); ok(gURLBar.hasAttribute("focused"), "url bar is focused"); @@ -111,14 +87,10 @@ add_task(async function searchTwice() { await assertUrlbarValue("test"); assertOneOffButtonsVisible(true); await UrlbarTestUtils.promisePopupClose(window); - - resetNotification(); }); // Calls search() during an IME composition. add_task(async function searchIME() { - let resetNotification = enableSearchSuggestionsNotification(); - // First run a search. gURLBar.blur(); await UrlbarTestUtils.promisePopupOpen(window, () => gURLBar.search("test")); @@ -143,31 +115,8 @@ add_task(async function searchIME() { assertOneOffButtonsVisible(true); await UrlbarTestUtils.promisePopupClose(window); - - resetNotification(); }); -/** - * Makes sure the search-suggestions notification will be shown the next several - * times the popup opens. - * - * @returns {function} A function that you should call when you're done that - * resets the state state of the notification. - */ -function enableSearchSuggestionsNotification() { - let which = gURLBar._whichSearchSuggestionsNotification || undefined; - gURLBar._whichSearchSuggestionsNotification = "opt-out"; - Services.prefs.setIntPref("timesBeforeHidingSuggestionsHint", 10); - return function reset() { - if (which === undefined) { - delete gURLBar._whichSearchSuggestionsNotification; - } else { - gURLBar._whichSearchSuggestionsNotification = which; - } - Services.prefs.clearUserPref("timesBeforeHidingSuggestionsHint"); - }; -} - /** * Asserts that the one-off search buttons are or aren't visible. * diff --git a/testing/awsy/conf/base-prefs.json b/testing/awsy/conf/base-prefs.json index 3a64215949bc..f3874c720a53 100644 --- a/testing/awsy/conf/base-prefs.json +++ b/testing/awsy/conf/base-prefs.json @@ -1,6 +1,5 @@ { "browser.tabs.remote.separatePrivilegedContentProcess": true, - "browser.urlbar.userMadeSearchSuggestionsChoice": true, "javascript.options.asyncstack": false, "image.mem.surfacecache.min_expiration_ms": 10000, "network.proxy.socks": "localhost", diff --git a/testing/awsy/conf/prefs.json b/testing/awsy/conf/prefs.json index 09534fd374c7..325b5795c80d 100644 --- a/testing/awsy/conf/prefs.json +++ b/testing/awsy/conf/prefs.json @@ -1,7 +1,6 @@ { "browser.newtabpage.enabled": true, "browser.tabs.remote.separatePrivilegedContentProcess": true, - "browser.urlbar.userMadeSearchSuggestionsChoice": true, "javascript.options.asyncstack": false, "image.mem.surfacecache.min_expiration_ms": 10000, "network.proxy.socks": "localhost", diff --git a/testing/awsy/conf/tp6-prefs.json b/testing/awsy/conf/tp6-prefs.json index aa012dce77f6..2016fdb69653 100644 --- a/testing/awsy/conf/tp6-prefs.json +++ b/testing/awsy/conf/tp6-prefs.json @@ -1,7 +1,6 @@ { "browser.newtabpage.enabled": true, "browser.tabs.remote.separatePrivilegedContentProcess": true, - "browser.urlbar.userMadeSearchSuggestionsChoice": true, "javascript.options.asyncstack": false, "image.mem.surfacecache.min_expiration_ms": 10000, "network.proxy.http": "localhost", diff --git a/testing/marionette/client/marionette_driver/geckoinstance.py b/testing/marionette/client/marionette_driver/geckoinstance.py index 20d6de5e005e..c3aec4fd5c3c 100644 --- a/testing/marionette/client/marionette_driver/geckoinstance.py +++ b/testing/marionette/client/marionette_driver/geckoinstance.py @@ -594,10 +594,6 @@ class DesktopInstance(GeckoInstance): # connections. "browser.urlbar.suggest.searches": False, - # Turn off the location bar search suggestions opt-in. It interferes with - # tests that don't expect it to be there. - "browser.urlbar.userMadeSearchSuggestionsChoice": True, - # Don't warn when exiting the browser "browser.warnOnQuit": False, diff --git a/testing/profiles/perf/user.js b/testing/profiles/perf/user.js index f584d983def3..7b00745cb2b8 100644 --- a/testing/profiles/perf/user.js +++ b/testing/profiles/perf/user.js @@ -34,9 +34,6 @@ user_pref("browser.safebrowsing.provider.mozilla.updateURL", "http://127.0.0.1/s user_pref("browser.search.geoip.url", ""); user_pref("browser.shell.checkDefaultBrowser", false); user_pref("browser.tabs.remote.autostart", true); -// Turn off the location bar search suggestions opt-in. It interferes with -// tests that don't expect it to be there. -user_pref("browser.urlbar.userMadeSearchSuggestionsChoice", true); user_pref("browser.warnOnQuit", false); user_pref("datareporting.healthreport.documentServerURI", "http://127.0.0.1/healthreport/"); user_pref("devtools.chrome.enabled", false); diff --git a/testing/profiles/unittest-required/user.js b/testing/profiles/unittest-required/user.js index 2233e23c27ac..a8ee7afa2cc7 100644 --- a/testing/profiles/unittest-required/user.js +++ b/testing/profiles/unittest-required/user.js @@ -68,9 +68,6 @@ user_pref("browser.urlbar.speculativeConnect.enabled", false); // connections. user_pref("browser.urlbar.suggest.searches", false); user_pref("browser.urlbar.usepreloadedtopurls.enabled", false); -// Turn off the location bar search suggestions opt-in. It interferes with -// tests that don't expect it to be there. -user_pref("browser.urlbar.userMadeSearchSuggestionsChoice", true); user_pref("browser.warnOnQuit", false); // Enable webapps testing mode, which bypasses native installation. user_pref("browser.webapps.testing", true); diff --git a/testing/runtimes/mochitest-browser-chrome-e10s.runtimes.json b/testing/runtimes/mochitest-browser-chrome-e10s.runtimes.json index 176f019c1e7c..65bd807e6e51 100644 --- a/testing/runtimes/mochitest-browser-chrome-e10s.runtimes.json +++ b/testing/runtimes/mochitest-browser-chrome-e10s.runtimes.json @@ -245,9 +245,6 @@ "browser/base/content/test/urlbar/browser_urlbarOneOffs_searchSuggestions.js": 3654, "browser/base/content/test/urlbar/browser_urlbarSearchSingleWordNotification.js": 16459, "browser/base/content/test/urlbar/browser_urlbarSearchSuggestions.js": 4085, - "browser/base/content/test/urlbar/browser_urlbarSearchSuggestionsNotification.js": 10786, - "browser/base/content/test/urlbar/browser_urlbarSearchSuggestions_opt-in.js": 8813, - "browser/base/content/test/urlbar/browser_urlbarSearchSuggestions_opt-out.js": 4153, "browser/base/content/test/urlbar/browser_urlbarSearchTelemetry.js": 5768, "browser/base/content/test/urlbar/browser_urlbar_autoFill_backspaced.js": 5194, "browser/base/content/test/urlbar/browser_urlbar_blanking.js": 3831, diff --git a/testing/runtimes/mochitest-browser-chrome.runtimes.json b/testing/runtimes/mochitest-browser-chrome.runtimes.json index 25a6ec36ba01..f516393d83f0 100644 --- a/testing/runtimes/mochitest-browser-chrome.runtimes.json +++ b/testing/runtimes/mochitest-browser-chrome.runtimes.json @@ -238,9 +238,6 @@ "browser/base/content/test/urlbar/browser_urlbarRaceWithTabs.js": 1781, "browser/base/content/test/urlbar/browser_urlbarSearchSingleWordNotification.js": 15180, "browser/base/content/test/urlbar/browser_urlbarSearchSuggestions.js": 2747, - "browser/base/content/test/urlbar/browser_urlbarSearchSuggestionsNotification.js": 9662, - "browser/base/content/test/urlbar/browser_urlbarSearchSuggestions_opt-in.js": 8019, - "browser/base/content/test/urlbar/browser_urlbarSearchSuggestions_opt-out.js": 2967, "browser/base/content/test/urlbar/browser_urlbarSearchTelemetry.js": 4201, "browser/base/content/test/urlbar/browser_urlbarUpdateForDomainCompletion.js": 2649, "browser/base/content/test/urlbar/browser_urlbar_autoFill_backspaced.js": 5169, diff --git a/toolkit/components/telemetry/app/TelemetryEnvironment.jsm b/toolkit/components/telemetry/app/TelemetryEnvironment.jsm index f268c272209f..ab1abdea57ba 100644 --- a/toolkit/components/telemetry/app/TelemetryEnvironment.jsm +++ b/toolkit/components/telemetry/app/TelemetryEnvironment.jsm @@ -244,10 +244,6 @@ const DEFAULT_ENVIRONMENT_PREFS = new Map([ ["browser.startup.page", { what: RECORD_PREF_VALUE }], ["toolkit.cosmeticAnimations.enabled", { what: RECORD_PREF_VALUE }], ["browser.urlbar.suggest.searches", { what: RECORD_PREF_VALUE }], - [ - "browser.urlbar.userMadeSearchSuggestionsChoice", - { what: RECORD_PREF_VALUE }, - ], ["devtools.chrome.enabled", { what: RECORD_PREF_VALUE }], ["devtools.debugger.enabled", { what: RECORD_PREF_VALUE }], ["devtools.debugger.remote-enabled", { what: RECORD_PREF_VALUE }], diff --git a/toolkit/components/telemetry/docs/data/environment.rst b/toolkit/components/telemetry/docs/data/environment.rst index 2a425d13f7ed..434ebcbca9f3 100644 --- a/toolkit/components/telemetry/docs/data/environment.rst +++ b/toolkit/components/telemetry/docs/data/environment.rst @@ -380,8 +380,6 @@ The following is a partial list of collected preferences. - ``browser.urlbar.suggest.searches``: True if search suggestions are enabled in the urlbar. Defaults to false. -- ``browser.urlbar.userMadeSearchSuggestionsChoice``: True if the user has clicked Yes or No in the urlbar's opt-in notification. Defaults to false. - - ``browser.zoom.full`` (deprecated): True if zoom is enabled for both text and images, that is if "Zoom Text Only" is not enabled. Defaults to true. This preference was collected in Firefox 50 to 52 (`Bug 979323 `_). - ``fission.autostart``: True if fission is enabled at startup. Default to false. For more information please visit `the project wiki page `_.