Bug 1367790 - Remove code for the opt-in Search Suggestions notification. r=paolo draft
authorMarco Bonardo <mbonardo@mozilla.com>
Thu, 12 Oct 2017 15:04:23 +0200
changeset 679284 5f88d6a15fc819e32c17e5fb8bc9d5979c41e40b
parent 679172 191c4f1b5992973a6910e4999081e46c5e5a2b56
child 735562 f5f9bde8cd3cccedab61910d7403c2b7c4fbf4e1
push id84179
push usermak77@bonardo.net
push dateThu, 12 Oct 2017 13:42:23 +0000
reviewerspaolo
bugs1367790
milestone58.0a1
Bug 1367790 - Remove code for the opt-in Search Suggestions notification. r=paolo MozReview-Commit-ID: 4uz6xZ8jQWr
browser/app/profile/firefox.js
browser/base/content/test/urlbar/browser.ini
browser/base/content/test/urlbar/browser_urlbarSearchSuggestions_opt-in.js
browser/base/content/urlbarBindings.xml
browser/locales/en-US/chrome/browser/browser.dtd
browser/themes/shared/urlbarSearchSuggestionsNotification.inc.css
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -313,20 +313,19 @@ pref("browser.urlbar.delay", 50);
 pref("browser.urlbar.maxHistoricalSearchSuggestions", 1);
 
 // The default behavior for the urlbar can be configured to use any combination
 // of the match filters with each additional filter adding more results (union).
 pref("browser.urlbar.suggest.history",              true);
 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-in notification will be shown on 4 different days.
-pref("browser.urlbar.daysBeforeHidingSuggestionsPrompt", 4);
-pref("browser.urlbar.lastSuggestionsPromptDate", 20160601);
 // 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);
 
 // Restrictions to current suggestions can also be applied (intersection).
--- a/browser/base/content/test/urlbar/browser.ini
+++ b/browser/base/content/test/urlbar/browser.ini
@@ -84,20 +84,16 @@ support-files =
 [browser_urlbarPrivateBrowsingWindowChange.js]
 [browser_urlbarRaceWithTabs.js]
 [browser_urlbarRevert.js]
 [browser_urlbarSearchSingleWordNotification.js]
 [browser_urlbarSearchSuggestions.js]
 support-files =
   searchSuggestionEngine.xml
   searchSuggestionEngine.sjs
-[browser_urlbarSearchSuggestions_opt-in.js]
-support-files =
-  searchSuggestionEngine.xml
-  searchSuggestionEngine.sjs
 [browser_urlbarSearchSuggestions_opt-out.js]
 support-files =
   searchSuggestionEngine.xml
   searchSuggestionEngine.sjs
 [browser_urlbarSearchTelemetry.js]
 support-files =
   searchSuggestionEngine.xml
   searchSuggestionEngine.sjs
deleted file mode 100644
--- a/browser/base/content/test/urlbar/browser_urlbarSearchSuggestions_opt-in.js
+++ /dev/null
@@ -1,232 +0,0 @@
-const SUGGEST_ALL_PREF = "browser.search.suggest.enabled";
-const SUGGEST_URLBAR_PREF = "browser.urlbar.suggest.searches";
-const CHOICE_PREF = "browser.urlbar.userMadeSearchSuggestionsChoice";
-const TEST_ENGINE_BASENAME = "searchSuggestionEngine.xml";
-
-// Must run first.
-add_task(async function prepare() {
-  let engine = await promiseNewSearchEngine(TEST_ENGINE_BASENAME);
-  let oldCurrentEngine = Services.search.currentEngine;
-  Services.search.currentEngine = engine;
-  let suggestionsEnabled = Services.prefs.getBoolPref(SUGGEST_URLBAR_PREF);
-  let defaults = Services.prefs.getDefaultBranch("browser.urlbar.");
-  let searchSuggestionsDefault = defaults.getBoolPref("suggest.searches");
-  defaults.setBoolPref("suggest.searches", false);
-  registerCleanupFunction(async function() {
-    defaults.setBoolPref("suggest.searches", searchSuggestionsDefault);
-    Services.search.currentEngine = oldCurrentEngine;
-    Services.prefs.clearUserPref(SUGGEST_ALL_PREF);
-    Services.prefs.setBoolPref(SUGGEST_URLBAR_PREF, suggestionsEnabled);
-
-    // Disable the notification for future tests so it doesn't interfere with
-    // them.  clearUserPref() won't work because by default the pref is false.
-    Services.prefs.setBoolPref(CHOICE_PREF, true);
-
-    // Make sure the popup is closed for the next test.
-    gURLBar.blur();
-    Assert.ok(!gURLBar.popup.popupOpen, "popup should be closed");
-  });
-});
-
-add_task(async function focus() {
-  // Focusing the urlbar used to open the popup in order to show the
-  // notification, but it doesn't anymore.  Make sure it does not.
-  setupVisibleNotification();
-  gURLBar.blur();
-  gURLBar.focus();
-  Assert.ok(!gURLBar.popup.popupOpen, "popup should remain closed");
-});
-
-add_task(async function dismissWithoutResults() {
-  setupVisibleNotification();
-  gURLBar.blur();
-  gURLBar.focus();
-  let popupPromise = promisePopupShown(gURLBar.popup);
-  gURLBar.openPopup();
-  await popupPromise;
-  Assert.ok(gURLBar.popup.popupOpen, "popup should be open");
-  assertVisible(true);
-  Assert.equal(gURLBar.popup._matchCount, 0, "popup should have no results");
-  let disableButton = document.getAnonymousElementByAttribute(
-    gURLBar.popup, "anonid", "search-suggestions-notification-disable"
-  );
-  let transitionPromise = promiseTransition();
-  disableButton.click();
-  await transitionPromise;
-  Assert.ok(!gURLBar.popup.popupOpen, "popup should be closed");
-  gURLBar.blur();
-  gURLBar.focus();
-  Assert.ok(!gURLBar.popup.popupOpen, "popup should remain closed");
-  await promiseAutocompleteResultPopup("foo");
-  Assert.ok(gURLBar.popup.popupOpen, "popup should be open");
-  assertVisible(false);
-});
-
-add_task(async function dismissWithResults() {
-  setupVisibleNotification();
-  gURLBar.blur();
-  gURLBar.focus();
-  await promiseAutocompleteResultPopup("foo");
-  Assert.ok(gURLBar.popup.popupOpen, "popup should be open");
-  assertVisible(true);
-  Assert.ok(gURLBar.popup._matchCount > 0, "popup should have results");
-  let disableButton = document.getAnonymousElementByAttribute(
-    gURLBar.popup, "anonid", "search-suggestions-notification-disable"
-  );
-  let transitionPromise = promiseTransition();
-  disableButton.click();
-  await transitionPromise;
-  Assert.ok(gURLBar.popup.popupOpen, "popup should remain open");
-  gURLBar.blur();
-  gURLBar.focus();
-  Assert.ok(!gURLBar.popup.popupOpen, "popup should remain closed");
-  await promiseAutocompleteResultPopup("foo");
-  Assert.ok(gURLBar.popup.popupOpen, "popup should be open");
-  assertVisible(false);
-});
-
-add_task(async function disable() {
-  setupVisibleNotification();
-  gURLBar.blur();
-  gURLBar.focus();
-  await promiseAutocompleteResultPopup("foo");
-  Assert.ok(gURLBar.popup.popupOpen, "popup should be open");
-  assertVisible(true);
-  let disableButton = document.getAnonymousElementByAttribute(
-    gURLBar.popup, "anonid", "search-suggestions-notification-disable"
-  );
-  let transitionPromise = promiseTransition();
-  disableButton.click();
-  await transitionPromise;
-  gURLBar.blur();
-  await promiseAutocompleteResultPopup("foo");
-  Assert.ok(!suggestionsPresent());
-});
-
-add_task(async function enable() {
-  setupVisibleNotification();
-  gURLBar.blur();
-  gURLBar.focus();
-  await promiseAutocompleteResultPopup("foo");
-  assertVisible(true);
-  Assert.ok(!suggestionsPresent());
-  let enableButton = document.getAnonymousElementByAttribute(
-    gURLBar.popup, "anonid", "search-suggestions-notification-enable"
-  );
-  let searchPromise = BrowserTestUtils.waitForCondition(suggestionsPresent,
-                                                        "waiting for suggestions");
-  enableButton.click();
-  await searchPromise;
-  // Clicking Yes should trigger a new search so that suggestions appear
-  // immediately.
-  Assert.ok(suggestionsPresent());
-  gURLBar.blur();
-  gURLBar.focus();
-  // Suggestions should still be present in a new search of course.
-  await promiseAutocompleteResultPopup("bar");
-  Assert.ok(suggestionsPresent());
-});
-
-add_task(async function privateWindow() {
-  // Since suggestions are disabled in private windows, the notification should
-  // not appear even when suggestions are otherwise enabled.
-  setupVisibleNotification();
-  let win = await BrowserTestUtils.openNewBrowserWindow({ private: true });
-  win.gURLBar.blur();
-  win.gURLBar.focus();
-  await promiseAutocompleteResultPopup("foo", win);
-  assertVisible(false, win);
-  win.gURLBar.blur();
-  await BrowserTestUtils.closeWindow(win);
-});
-
-add_task(async function multipleWindows() {
-  // Opening multiple windows, using their urlbars, and then dismissing the
-  // notification in one should dismiss the notification in all.
-  setupVisibleNotification();
-
-  gURLBar.focus();
-  await promiseAutocompleteResultPopup("win1");
-  assertVisible(true);
-
-  let win2 = await BrowserTestUtils.openNewBrowserWindow();
-  win2.gURLBar.focus();
-  await promiseAutocompleteResultPopup("win2", win2);
-  assertVisible(true, win2);
-
-  let win3 = await BrowserTestUtils.openNewBrowserWindow();
-  win3.gURLBar.focus();
-  await promiseAutocompleteResultPopup("win3", win3);
-  assertVisible(true, win3);
-
-  let enableButton = win3.document.getAnonymousElementByAttribute(
-    win3.gURLBar.popup, "anonid", "search-suggestions-notification-enable"
-  );
-  let transitionPromise = promiseTransition(win3);
-  enableButton.click();
-  await transitionPromise;
-  assertVisible(false, win3);
-
-  win2.gURLBar.focus();
-  await promiseAutocompleteResultPopup("win2done", win2);
-  assertVisible(false, win2);
-
-  gURLBar.focus();
-  await promiseAutocompleteResultPopup("win1done");
-  assertVisible(false);
-
-  await BrowserTestUtils.closeWindow(win2);
-  await BrowserTestUtils.closeWindow(win3);
-});
-
-add_task(async function enableOutsideNotification() {
-  // Setting the suggest.searches pref outside the notification (e.g., by
-  // ticking the checkbox in the preferences window) should hide it.
-  setupVisibleNotification();
-  Services.prefs.setBoolPref(SUGGEST_URLBAR_PREF, true);
-  gURLBar.focus();
-  await promiseAutocompleteResultPopup("foo");
-  assertVisible(false);
-});
-
-function setupVisibleNotification() {
-  Services.prefs.setBoolPref(SUGGEST_ALL_PREF, true);
-  // Toggle to reset the whichNotification cache.
-  Services.prefs.setBoolPref(SUGGEST_URLBAR_PREF, true);
-  Services.prefs.setBoolPref(SUGGEST_URLBAR_PREF, false);
-  Services.prefs.setBoolPref(CHOICE_PREF, false);
-}
-
-function suggestionsPresent() {
-  let controller = gURLBar.popup.input.controller;
-  let matchCount = controller.matchCount;
-  for (let i = 0; i < matchCount; i++) {
-    let url = controller.getValueAt(i);
-    let mozActionMatch = url.match(/^moz-action:([^,]+),(.*)$/);
-    if (mozActionMatch) {
-      let [, type, paramStr] = mozActionMatch;
-      let params = JSON.parse(paramStr);
-      if (type == "searchengine" && "searchSuggestion" in params) {
-        return true;
-      }
-    }
-  }
-  return false;
-}
-
-function assertVisible(visible, win = window) {
-  let style =
-    win.getComputedStyle(win.gURLBar.popup.searchSuggestionsNotification);
-  let check = visible ? "notEqual" : "equal";
-  Assert[check](style.display, "none");
-}
-
-function promiseTransition(win = window) {
-  return new Promise(resolve => {
-    win.gURLBar.popup.addEventListener("transitionend", function() {
-      // The urlbar needs to handle the transitionend first, but that happens
-      // naturally since promises are resolved at the end of the current tick.
-      resolve();
-    }, {capture: true, once: true});
-  });
-}
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -1419,54 +1419,37 @@ file, You can obtain one at http://mozil
           // checks again at every locationbar focus.
           if (this._whichSearchSuggestionsNotification) {
             return this._whichSearchSuggestionsNotification;
           }
 
           if (this.browserSearchSuggestEnabled && !this.inPrivateContext &&
               // In any case, if the user made a choice we should not nag him.
               !this._userMadeSearchSuggestionsChoice) {
-            let enabledByDefault = this._defaultPrefs.getBoolPref("suggest.searches");
-            if (!enabledByDefault &&
-                this._prefs.getIntPref("daysBeforeHidingSuggestionsPrompt")) {
-              return "opt-in";
-            }
-            if (enabledByDefault &&
-                // Has not been switched off.
-                this.urlbarSearchSuggestEnabled &&
+            if (this._defaultPrefs.getBoolPref("suggest.searches") &&
+                this.urlbarSearchSuggestEnabled && // Has not been switched off.
                 this._prefs.getIntPref("timesBeforeHidingSuggestionsHint")) {
               return "opt-out";
             }
           }
           return this._whichSearchSuggestionsNotification = "none";
         ]]></getter>
       </property>
 
       <method name="updateSearchSuggestionsNotificationImpressions">
         <parameter name="whichNotification"/>
         <body><![CDATA[
           if (whichNotification == "none") {
             throw new Error("Unexpected notification type");
           }
 
-          let useDays = whichNotification == "opt-in";
-          let prefName = useDays ? "daysBeforeHidingSuggestionsPrompt"
-                                 : "timesBeforeHidingSuggestionsHint";
-          let remaining = this._prefs.getIntPref(prefName);
-          if (remaining <= 0)
-            return;
-
-          let now = new Date();
-          let date = now.getFullYear() * 10000 + (now.getMonth() + 1) * 100 + now.getDate();
-
-          let previousDate = this._prefs.getIntPref("lastSuggestionsPromptDate");
-          if (!useDays || previousDate != date) {
-            this._prefs.setIntPref(prefName, remaining - 1);
+          let remaining = this._prefs.getIntPref("timesBeforeHidingSuggestionsHint");
+          if (remaining > 0) {
+            this._prefs.setIntPref("timesBeforeHidingSuggestionsHint", remaining - 1);
           }
-          this._prefs.setIntPref("lastSuggestionsPromptDate", date);
         ]]></body>
       </method>
 
       <method name="maybeShowSearchSuggestionsNotificationOnFocus">
         <parameter name="mouseFocused"/>
         <body><![CDATA[
           let whichNotification = this.whichSearchSuggestionsNotification;
           if (this._showSearchSuggestionNotificationOnMouseFocus &&
@@ -1626,42 +1609,16 @@ file, You can obtain one at http://mozil
     </resources>
 
     <content ignorekeys="true" level="top" consumeoutsideclicks="never"
              aria-owns="richlistbox">
       <xul:deck anonid="search-suggestions-notification"
                 align="center"
                 role="alert"
                 selectedIndex="0">
-        <!-- OPT-IN -->
-        <xul:hbox flex="1" align="center" anonid="search-suggestions-opt-in">
-          <xul:description flex="1" id="search-suggestions-question">
-            &urlbar.searchSuggestionsNotification.question;
-            <!-- Several things here are to make the label accessibile via an
-                accesskey so that a11y doesn't suck: the accesskey, using an
-                onclick handler instead of an href attribute, the control
-                attribute, and having the control attribute refer to a valid ID
-                that is the label itself. -->
-            <xul:label id="search-suggestions-learn-more"
-                      class="text-link"
-                      role="link"
-                      value="&urlbar.searchSuggestionsNotification.learnMore;"
-                      accesskey="&urlbar.searchSuggestionsNotification.learnMore.accesskey;"
-                      onclick="document.getBindingParent(this).openSearchSuggestionsNotificationLearnMoreURL();"
-                      control="search-suggestions-learn-more"/>
-          </xul:description>
-          <xul:button anonid="search-suggestions-notification-disable"
-                      label="&urlbar.searchSuggestionsNotification.disable;"
-                      accesskey="&urlbar.searchSuggestionsNotification.disable.accesskey;"
-                      onclick="document.getBindingParent(this).dismissSearchSuggestionsNotification(false);"/>
-          <xul:button anonid="search-suggestions-notification-enable"
-                      label="&urlbar.searchSuggestionsNotification.enable;"
-                      accesskey="&urlbar.searchSuggestionsNotification.enable.accesskey;"
-                      onclick="document.getBindingParent(this).dismissSearchSuggestionsNotification(true);"/>
-        </xul:hbox>
         <!-- OPT-OUT -->
         <xul:hbox flex="1" align="center" anonid="search-suggestions-opt-out">
           <xul:image class="ac-site-icon" type="searchengine"/>
           <xul:hbox anonid="search-suggestions-hint-typing">
             <xul:description class="ac-title-text">&brandShortName;</xul:description>
           </xul:hbox>
           <xul:hbox anonid="search-suggestions-hint-box" flex="1">
             <xul:description id="search-suggestions-hint">
@@ -1760,48 +1717,16 @@ file, You can obtain one at http://mozil
             this.oneOffSearchButtons.telemetryOrigin = null;
             this.oneOffSearchButtons.style.display = "none";
             this.oneOffSearchButtons.textbox = null;
             this.oneOffSearchButtons.popup = null;
           }
         ]]></body>
       </method>
 
-      <method name="openSearchSuggestionsNotificationLearnMoreURL">
-        <body><![CDATA[
-        let url = Services.urlFormatter.formatURL(
-          Services.prefs.getCharPref("app.support.baseURL") + "suggestions"
-        );
-        openUILinkIn(url, "tab");
-        ]]></body>
-      </method>
-
-      <method name="dismissSearchSuggestionsNotification">
-        <parameter name="enableSuggestions"/>
-        <body><![CDATA[
-          // Make sure the urlbar is focused.  It won't be, for example, if the
-          // user used an accesskey to make an opt-in choice.  mIgnoreFocus
-          // prevents the text from being selected.
-          this.input.mIgnoreFocus = true;
-          this.input.focus();
-          this.input.mIgnoreFocus = false;
-
-          Services.prefs.setBoolPref(
-            "browser.urlbar.suggest.searches", enableSuggestions
-          );
-          Services.prefs.setBoolPref(
-            "browser.urlbar.userMadeSearchSuggestionsChoice", true
-          );
-          // Hide the notification.
-          this.searchSuggestionsNotificationWasDismissed(
-            Services.prefs.getBoolPref("browser.urlbar.suggest.searches")
-          );
-        ]]></body>
-      </method>
-
       <!-- Override this so that navigating between items results in an item
            always being selected. -->
       <method name="getNextIndex">
         <parameter name="reverse"/>
         <parameter name="amount"/>
         <parameter name="index"/>
         <parameter name="maxRow"/>
         <body><![CDATA[
@@ -1982,39 +1907,33 @@ file, You can obtain one at http://mozil
         ]]></body>
       </method>
 
       <method name="_showSearchSuggestionsNotification">
         <parameter name="whichNotification"/>
         <parameter name="popupDirection"/>
         <body>
           <![CDATA[
-          let deckIndex = 0;
           if (whichNotification == "opt-out") {
-            deckIndex = 1;
-
             if (this.siteIconStart) {
               this.searchSuggestionsNotification.style.paddingInlineStart =
                 this.siteIconStart + "px";
             } else {
               this.searchSuggestionsNotification.style.removeProperty("padding-inline-start");
             }
 
             // We want to animate the opt-out hint only once.
             if (!this._firstSearchSuggestionsNotification) {
               this._firstSearchSuggestionsNotification = true;
               this.searchSuggestionsNotification.setAttribute("animate", "true");
             }
           }
-          this.searchSuggestionsNotification.setAttribute("selectedIndex", deckIndex);
 
-          let ariaDescElt = whichNotification == "opt-in" ?
-            "search-suggestions-question" : "search-suggestions-hint";
-
-          this.searchSuggestionsNotification.setAttribute("aria-describedby", ariaDescElt);
+          this.searchSuggestionsNotification.setAttribute("aria-describedby",
+                                                          "search-suggestions-hint");
 
           // With the notification shown, the listbox's height can sometimes be
           // too small when it's flexed, as it normally is.  Also, it can start
           // out slightly scrolled down.  Both problems appear together, most
           // often when the popup is very narrow and the notification's text
           // must wrap.  Work around them by removing the flex.
           //
           // But without flexing the listbox, the listbox's height animation
@@ -2034,34 +1953,16 @@ file, You can obtain one at http://mozil
             let event = document.createEvent("Events");
             event.initEvent("AlertActive", true, true);
             this.searchSuggestionsNotification.dispatchEvent(event);
           }
           ]]>
         </body>
       </method>
 
-      <method name="searchSuggestionsNotificationWasDismissed">
-        <parameter name="enableSuggestions"/>
-        <body>
-          <![CDATA[
-          if (!this.popupOpen) {
-            this._hideSearchSuggestionsNotification();
-            return;
-          }
-          this._hideSearchSuggestionsNotificationWithAnimation().then(() => {
-            if (enableSuggestions && this.input.textValue) {
-              // Start a new search so that suggestions appear immediately.
-              this.input.controller.startSearch(this.input.textValue);
-            }
-          });
-          ]]>
-        </body>
-      </method>
-
       <method name="_hideSearchSuggestionsNotification">
         <body>
           <![CDATA[
           this.classList.remove("showSearchSuggestionsNotification");
           this.richlistbox.flex = 1;
           this.removeAttribute("dontanimate");
           this.searchSuggestionsNotification.removeAttribute("animate");
           if (this._matchCount) {
@@ -2069,43 +1970,16 @@ file, You can obtain one at http://mozil
             this._invalidate();
           } else {
             this.closePopup();
           }
           ]]>
         </body>
       </method>
 
-      <method name="_hideSearchSuggestionsNotificationWithAnimation">
-        <body>
-          <![CDATA[
-          return new Promise(resolve => {
-            let notificationHeight = this.searchSuggestionsNotification
-                                         .getBoundingClientRect()
-                                         .height;
-            this.searchSuggestionsNotification.style.marginTop =
-              "-" + notificationHeight + "px";
-
-            let popupHeightPx =
-              (this.getBoundingClientRect().height - notificationHeight) + "px";
-            this.style.height = popupHeightPx;
-
-            let onTransitionEnd = () => {
-              this.removeEventListener("transitionend", onTransitionEnd, true);
-              this.searchSuggestionsNotification.style.marginTop = "0px";
-              this.style.removeProperty("height");
-              this._hideSearchSuggestionsNotification();
-              resolve();
-            };
-            this.addEventListener("transitionend", onTransitionEnd, true);
-          });
-          ]]>
-        </body>
-      </method>
-
       <method name="_selectedOneOffChanged">
         <body><![CDATA[
           // Update all searchengine result items to use the newly selected
           // engine.
           for (let item of this.richlistbox.childNodes) {
             if (item.collapsed) {
               break;
             }
--- a/browser/locales/en-US/chrome/browser/browser.dtd
+++ b/browser/locales/en-US/chrome/browser/browser.dtd
@@ -426,24 +426,16 @@ These should match what Safari and other
 
 <!ENTITY openCmd.commandkey           "l">
 <!ENTITY urlbar.placeholder2          "Search or enter address">
 <!ENTITY urlbar.accesskey             "d">
 <!-- LOCALIZATION NOTE (urlbar.extension.label): Used to indicate that a selected autocomplete entry is provided by an extension. -->
 <!ENTITY urlbar.extension.label       "Extension:">
 <!ENTITY urlbar.switchToTab.label     "Switch to tab:">
 
-<!ENTITY urlbar.searchSuggestionsNotification.question "Would you like to improve your search experience with suggestions?">
-<!ENTITY urlbar.searchSuggestionsNotification.learnMore "Learn more…">
-<!ENTITY urlbar.searchSuggestionsNotification.learnMore.accesskey "l">
-<!ENTITY urlbar.searchSuggestionsNotification.disable "No">
-<!ENTITY urlbar.searchSuggestionsNotification.disable.accesskey "n">
-<!ENTITY urlbar.searchSuggestionsNotification.enable "Yes">
-<!ENTITY urlbar.searchSuggestionsNotification.enable.accesskey "y">
-
 <!-- LOCALIZATION NOTE (urlbar.searchSuggestionsNotification.hintPrefix): Shown just before the suggestions opt-out hint. -->
 <!ENTITY urlbar.searchSuggestionsNotification.hintPrefix "Tip:">
 <!-- LOCALIZATION NOTE (urlbar.searchSuggestionsNotification.hint): &#x1F50E; is the magnifier icon emoji, please don't change it. -->
 <!ENTITY urlbar.searchSuggestionsNotification.hint "Get help finding things! Look for the &#x1F50E; next to search suggestions.">
 <!ENTITY urlbar.searchSuggestionsNotification.changeSettingsWin "Change Options…">
 <!ENTITY urlbar.searchSuggestionsNotification.changeSettingsWin.accesskey "C">
 <!ENTITY urlbar.searchSuggestionsNotification.changeSettingsUnix "Change Preferences…">
 <!ENTITY urlbar.searchSuggestionsNotification.changeSettingsUnix.accesskey "C">
--- a/browser/themes/shared/urlbarSearchSuggestionsNotification.inc.css
+++ b/browser/themes/shared/urlbarSearchSuggestionsNotification.inc.css
@@ -6,68 +6,16 @@
 }
 
 /* Limit the size of the hidden description, since a deck takes the size of the biggest child */
 #PopupAutoCompleteRichResult > deck[anonid="search-suggestions-notification"][selectedIndex="0"] #search-suggestions-hint,
 #PopupAutoCompleteRichResult > deck[anonid="search-suggestions-notification"][selectedIndex="1"] #search-suggestions-question {
   max-height: 5em;
 }
 
-/* Opt-in notification */
-
-#PopupAutoCompleteRichResult > deck[anonid="search-suggestions-notification"] > hbox[anonid="search-suggestions-opt-in"] {
-  padding: 6px 0;
-  padding-inline-start: 44px;
-  background-color: hsla(210, 4%, 10%, 0.07);
-  background-image: url("chrome://browser/skin/info.svg");
-  background-clip: padding-box;
-  background-position: 20px center;
-  background-repeat: no-repeat;
-  background-size: 16px 16px;
-}
-
-#PopupAutoCompleteRichResult > deck[anonid="search-suggestions-notification"] > hbox[anonid="search-suggestions-opt-in"]:-moz-locale-dir(rtl) {
-  background-position: right 20px center;
-}
-
-#PopupAutoCompleteRichResult > deck[anonid="search-suggestions-notification"] > hbox[anonid="search-suggestions-opt-in"] > description {
-  margin: 0;
-  padding: 0;
-}
-
-#PopupAutoCompleteRichResult > deck[anonid="search-suggestions-notification"] > hbox[anonid="search-suggestions-opt-in"] > description > label.text-link {
-  margin-inline-start: 0;
-}
-
-#PopupAutoCompleteRichResult > deck[anonid="search-suggestions-notification"] button {
-  -moz-appearance: none;
-  min-width: 80px;
-  border-radius: 3px;
-  margin: 0;
-  margin-inline-start: 10px;
-}
-
-#PopupAutoCompleteRichResult > deck[anonid="search-suggestions-notification"] button[anonid="search-suggestions-notification-disable"] {
-  color: hsl(210, 0%, 38%);
-  background-color: hsl(210, 0%, 88%);
-  border: 1px solid hsl(210, 0%, 82%);
-}
-#PopupAutoCompleteRichResult > deck[anonid="search-suggestions-notification"] button[anonid="search-suggestions-notification-disable"]:hover {
-  background-color: hsl(210, 0%, 84%);
-}
-
-#PopupAutoCompleteRichResult > deck[anonid="search-suggestions-notification"] button[anonid="search-suggestions-notification-enable"] {
-  color: white;
-  background-color: hsl(93, 82%, 44%);
-  border: 1px solid hsl(93, 82%, 44%);
-}
-#PopupAutoCompleteRichResult > deck[anonid="search-suggestions-notification"] button[anonid="search-suggestions-notification-enable"]:hover {
-  background-color: hsl(93, 82%, 40%);
-}
-
 /* Opt-out hint */
 
 #PopupAutoCompleteRichResult > deck[anonid="search-suggestions-notification"] > hbox[anonid="search-suggestions-opt-out"] {
   font: message-box;
   display: flex;
   flex-direction: row;
   align-items: center;
   flex-wrap: nowrap;