Bug 1337627 - Remove remote discovery pane from about:addons r?robwu draft
authorMark Striemer <mstriemer@mozilla.com>
Thu, 05 Dec 2019 18:35:20 +0000
changeset 2519006 88a7afedd3d162d4b3e6ae76caa2ae8994189676
parent 2504725 79c674504d23705095f572227f1f167dabede843
child 2519007 aae5fd0db93fcb19ae01a9c34fb91398aab27965
push id460997
push userreviewbot
push dateThu, 05 Dec 2019 18:35:47 +0000
treeherdertry@8e21da253cd0 [default view] [failures only]
reviewersrobwu
bugs1337627
milestone72.0a1
Bug 1337627 - Remove remote discovery pane from about:addons r?robwu Differential Revision: https://phabricator.services.mozilla.com/D55719 Differential Diff: PHID-DIFF-keldg54nyqqlnkpfx4jj
browser/app/profile/firefox.js
browser/base/content/test/general/browser.ini
browser/base/content/test/general/browser_bug581242.js
browser/base/content/test/webextensions/browser.ini
browser/base/content/test/webextensions/browser_aboutaddons_blanktab.js
toolkit/locales/en-US/toolkit/about/aboutAddons.ftl
toolkit/mozapps/extensions/content/extensions.js
toolkit/mozapps/extensions/content/extensions.xul
toolkit/mozapps/extensions/test/browser/browser.ini
toolkit/mozapps/extensions/test/browser/browser_discovery.js
toolkit/mozapps/extensions/test/browser/browser_history_navigation.js
toolkit/mozapps/extensions/test/browser/browser_html_discover_view.js
toolkit/mozapps/extensions/test/browser/browser_html_discover_view_clientid.js
toolkit/mozapps/extensions/test/browser/browser_html_discover_view_prefs.js
toolkit/mozapps/extensions/test/browser/discovery.html
toolkit/mozapps/extensions/test/browser/more_options.xhtml
toolkit/mozapps/extensions/test/browser/options.xhtml
toolkit/mozapps/extensions/test/browser/releaseNotes.xhtml
toolkit/themes/osx/mozapps/extensions/discover-logo.png
toolkit/themes/osx/mozapps/jar.mn
toolkit/themes/shared/extensions/extensions.inc.css
toolkit/themes/shared/non-mac.jar.inc.mn
toolkit/themes/windows/mozapps/extensions/discover-logo.png
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -39,19 +39,16 @@ pref("extensions.getAddons.cache.enabled
 pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/api/v3/addons/search/?guid=%IDS%&lang=%LOCALE%");
 pref("extensions.getAddons.compatOverides.url", "https://services.addons.mozilla.org/api/v3/addons/compat-override/?guid=%IDS%&lang=%LOCALE%");
 pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/firefox/search?q=%TERMS%&platform=%OS%&appver=%VERSION%");
 pref("extensions.webservice.discoverURL", "https://discovery.addons.mozilla.org/%LOCALE%/firefox/discovery/pane/%VERSION%/%OS%/%COMPATIBILITY_MODE%");
 pref("extensions.getAddons.link.url", "https://addons.mozilla.org/%LOCALE%/firefox/");
 pref("extensions.getAddons.langpacks.url", "https://services.addons.mozilla.org/api/v3/addons/language-tools/?app=firefox&type=language&appversion=%VERSION%");
 pref("extensions.getAddons.discovery.api_url", "https://services.addons.mozilla.org/api/v4/discovery/?lang=%LOCALE%&edition=%DISTRIBUTION%");
 
-// Enable the HTML-based discovery panel at about:addons.
-pref("extensions.htmlaboutaddons.discover.enabled", true);
-
 // The URL for the privacy policy related to recommended extensions.
 pref("extensions.recommendations.privacyPolicyUrl", "https://www.mozilla.org/privacy/firefox/?utm_source=firefox-browser&utm_medium=firefox-browser&utm_content=privacy-policy-link#addons");
 // The URL for Firefox Color, recommended on the theme page in about:addons.
 pref("extensions.recommendations.themeRecommendationUrl", "https://color.firefox.com/?utm_source=firefox-browser&utm_medium=firefox-browser&utm_content=theme-footer-link");
 
 pref("extensions.update.autoUpdateDefault", true);
 
 // Check AUS for system add-on updates.
--- a/browser/base/content/test/general/browser.ini
+++ b/browser/base/content/test/general/browser.ini
@@ -158,18 +158,16 @@ skip-if = toolkit != "cocoa" # Because o
 skip-if = (os == "mac") #Bug 1526628
 [browser_bug577121.js]
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_bug578534.js]
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_bug579872.js]
 skip-if = (verify && debug && (os == 'linux')) || (os == 'mac') || (os == 'linux' && !debug) #Bug 1448915
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
-[browser_bug581242.js]
-# DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_bug581253.js]
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_bug585785.js]
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_bug585830.js]
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_bug594131.js]
 skip-if = (verify && debug && (os == 'linux'))
--- a/browser/base/content/test/webextensions/browser.ini
+++ b/browser/base/content/test/webextensions/browser.ini
@@ -11,16 +11,17 @@ support-files =
   browser_webext_update_icon1.xpi
   browser_webext_update_icon2.xpi
   browser_webext_update_perms1.xpi
   browser_webext_update_perms2.xpi
   browser_webext_update_origins1.xpi
   browser_webext_update_origins2.xpi
   browser_webext_update.json
 
+[browser_aboutaddons_blanktab.js]
 [browser_extension_sideloading.js]
 [browser_extension_update_background.js]
 [browser_extension_update_background_noprompt.js]
 [browser_permissions_dismiss.js]
 [browser_permissions_installTrigger.js]
 [browser_permissions_local_file.js]
 [browser_permissions_mozAddonManager.js]
 [browser_permissions_optional.js]
rename from browser/base/content/test/general/browser_bug581242.js
rename to browser/base/content/test/webextensions/browser_aboutaddons_blanktab.js
--- a/browser/base/content/test/general/browser_bug581242.js
+++ b/browser/base/content/test/webextensions/browser_aboutaddons_blanktab.js
@@ -1,28 +1,26 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-function test() {
-  // Create a new tab and load about:addons
-  let blanktab = BrowserTestUtils.addTab(gBrowser);
-  gBrowser.selectedTab = blanktab;
-  BrowserOpenAddonsMgr();
+add_task(async function testBlankTabReusedAboutAddons() {
+  await BrowserTestUtils.withNewTab({ gBrowser }, async browser => {
+    let tabCount = gBrowser.tabs.length;
+    is(browser, gBrowser.selectedBrowser, "New tab is selected");
+
+    // Opening about:addons shouldn't change the selected tab.
+    BrowserOpenAddonsMgr();
+
+    is(browser, gBrowser.selectedBrowser, "No new tab was opened");
 
-  is(blanktab, gBrowser.selectedTab, "Current tab should be blank tab");
-  // Verify that about:addons loads
-  waitForExplicitFinish();
-  gBrowser.selectedBrowser.addEventListener(
-    "load",
-    function() {
-      let browser = blanktab.linkedBrowser;
-      is(
-        browser.currentURI.spec,
-        "about:addons",
-        "about:addons should load into blank tab."
-      );
-      gBrowser.removeTab(blanktab);
-      finish();
-    },
-    { capture: true, once: true }
-  );
-}
+    // Wait for about:addons to load.
+    await BrowserTestUtils.browserLoaded(browser);
+
+    is(
+      browser.currentURI.spec,
+      "about:addons",
+      "about:addons should load into blank tab."
+    );
+
+    is(gBrowser.tabs.length, tabCount, "Still the same number of tabs");
+  });
+});
--- a/toolkit/locales/en-US/toolkit/about/aboutAddons.ftl
+++ b/toolkit/locales/en-US/toolkit/about/aboutAddons.ftl
@@ -7,19 +7,16 @@ addons-window =
 
 search-header =
     .placeholder = Search addons.mozilla.org
     .searchbuttonlabel = Search
 
 search-header-shortcut =
     .key = f
 
-loading-label =
-    .value = Loading…
-
 list-empty-installed =
     .value = You don’t have any add-ons of this type installed
 
 list-empty-available-updates =
     .value = No updates found
 
 list-empty-recent-updates =
     .value = You haven’t recently updated any add-ons
@@ -79,27 +76,16 @@ cmd-install-addon =
     .label = Install
     .accesskey = I
 
 cmd-contribute =
     .label = Contribute
     .accesskey = C
     .tooltiptext = Contribute to the development of this add-on
 
-discover-title = What are Add-ons?
-
-discover-description =
-    Add-ons are applications that let you personalize { -brand-short-name } with
-    extra functionality or style. Try a time-saving sidebar, a weather notifier, or a themed look to make { -brand-short-name }
-    your own.
-
-discover-footer =
-    When you’re connected to the internet, this pane will feature
-    some of the best and most popular add-ons for you to try out.
-
 detail-version =
     .label = Version
 
 detail-last-updated =
     .label = Last Updated
 
 detail-contributions-description = The developer of this add-on asks that you help support its continued development by making a small contribution.
 
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -13,45 +13,25 @@ const { AddonManager } = ChromeUtils.imp
   "resource://gre/modules/AddonManager.jsm"
 );
 
 ChromeUtils.defineModuleGetter(
   this,
   "AMTelemetry",
   "resource://gre/modules/AddonManager.jsm"
 );
-ChromeUtils.defineModuleGetter(
-  this,
-  "ClientID",
-  "resource://gre/modules/ClientID.jsm"
-);
-ChromeUtils.defineModuleGetter(
-  this,
-  "PrivateBrowsingUtils",
-  "resource://gre/modules/PrivateBrowsingUtils.jsm"
-);
 
 XPCOMUtils.defineLazyPreferenceGetter(
   this,
   "XPINSTALL_ENABLED",
   "xpinstall.enabled",
   true
 );
 
-XPCOMUtils.defineLazyPreferenceGetter(
-  this,
-  "useHtmlDiscover",
-  "extensions.htmlaboutaddons.discover.enabled"
-);
-
-const PREF_DISCOVERURL = "extensions.webservice.discoverURL";
 const PREF_DISCOVER_ENABLED = "extensions.getAddons.showPane";
-const PREF_GETADDONS_CACHE_ENABLED = "extensions.getAddons.cache.enabled";
-const PREF_GETADDONS_CACHE_ID_ENABLED =
-  "extensions.%ID%.getAddons.cache.enabled";
 const PREF_UI_TYPE_HIDDEN = "extensions.ui.%TYPE%.hidden";
 const PREF_UI_LASTCATEGORY = "extensions.ui.lastCategory";
 
 var gViewDefault = "addons://discover/";
 
 var gStrings = {};
 XPCOMUtils.defineLazyServiceGetter(
   gStrings,
@@ -246,22 +226,16 @@ function loadView(aViewId) {
 
     gViewController.loadInitialView(aViewId);
   } else {
     gViewController.loadView(aViewId);
   }
 }
 
 function isDiscoverEnabled() {
-  if (
-    Services.prefs.getPrefType(PREF_DISCOVERURL) == Services.prefs.PREF_INVALID
-  ) {
-    return false;
-  }
-
   try {
     if (!Services.prefs.getBoolPref(PREF_DISCOVER_ENABLED)) {
       return false;
     }
   } catch (e) {}
 
   if (!XPINSTALL_ENABLED) {
     return false;
@@ -531,21 +505,20 @@ var gViewController = {
 
     this.viewObjects.shortcuts = htmlView("shortcuts");
     this.viewObjects.list = htmlView("list");
     this.viewObjects.detail = htmlView("detail");
     this.viewObjects.updates = htmlView("updates");
     // gUpdatesView still handles when the Available Updates category is
     // shown. Include it in viewObjects so it gets initialized and shutdown.
     this.viewObjects._availableUpdatesSidebar = gUpdatesView;
+    this.viewObjects.discover = htmlView("discover");
 
-    if (useHtmlDiscover && isDiscoverEnabled()) {
-      this.viewObjects.discover = htmlView("discover");
-    } else {
-      this.viewObjects.discover = gDiscoverView;
+    if (!isDiscoverEnabled()) {
+      gCategories.get("addons://discover/").hidden = true;
     }
 
     for (let type in this.viewObjects) {
       let view = this.viewObjects[type];
       view.initialize();
     }
 
     window.controllers.appendController(this);
@@ -1051,355 +1024,16 @@ var gCategories = {
     }
   },
 };
 
 // This needs to be defined before the XUL is parsed because some of the
 // categories are in the XUL markup.
 gCategories._defineCustomElement();
 
-var gDiscoverView = {
-  node: null,
-  enabled: true,
-  // Set to true after the view is first shown. If initialization completes
-  // after this then it must also load the discover homepage
-  loaded: false,
-  _browser: null,
-  _loading: null,
-  _error: null,
-  homepageURL: null,
-  _loadListeners: [],
-  hideHeader: true,
-  isRoot: true,
-
-  get clientIdDiscoveryEnabled() {
-    // These prefs match Discovery.jsm for enabling clientId cookies.
-    return (
-      Services.prefs.getBoolPref(
-        "datareporting.healthreport.uploadEnabled",
-        false
-      ) &&
-      Services.prefs.getBoolPref("browser.discovery.enabled", false) &&
-      !PrivateBrowsingUtils.isContentWindowPrivate(window)
-    );
-  },
-
-  async getClientHeader() {
-    if (!this.clientIdDiscoveryEnabled) {
-      return undefined;
-    }
-    let clientId = await ClientID.getClientIdHash();
-
-    let stream = Cc["@mozilla.org/io/string-input-stream;1"].createInstance(
-      Ci.nsISupportsCString
-    );
-    stream.data = `Moz-Client-Id: ${clientId}\r\n`;
-    return stream;
-  },
-
-  async initialize() {
-    this.enabled = isDiscoverEnabled();
-    if (!this.enabled) {
-      gCategories.get("addons://discover/").hidden = true;
-      return null;
-    }
-
-    this.node = document.getElementById("discover-view");
-    this._loading = document.getElementById("discover-loading");
-    this._error = document.getElementById("discover-error");
-    this._browser = document.getElementById("discover-browser");
-
-    let compatMode = "normal";
-    if (!AddonManager.checkCompatibility) {
-      compatMode = "ignore";
-    } else if (AddonManager.strictCompatibility) {
-      compatMode = "strict";
-    }
-
-    var url = Services.prefs.getCharPref(PREF_DISCOVERURL);
-    url = url.replace("%COMPATIBILITY_MODE%", compatMode);
-    url = Services.urlFormatter.formatURL(url);
-
-    let setURL = async aURL => {
-      try {
-        this.homepageURL = Services.io.newURI(aURL);
-      } catch (e) {
-        this.showError();
-        notifyInitialized();
-        return;
-      }
-
-      this._browser.addProgressListener(
-        this,
-        Ci.nsIWebProgress.NOTIFY_STATE_ALL |
-          Ci.nsIWebProgress.NOTIFY_SECURITY |
-          Ci.nsIWebProgress.NOTIFY_LOCATION
-      );
-
-      if (this.loaded) {
-        this._loadURL(
-          this.homepageURL.spec,
-          false,
-          notifyInitialized,
-          Services.scriptSecurityManager.getSystemPrincipal(),
-          await this.getClientHeader()
-        );
-      } else {
-        notifyInitialized();
-      }
-    };
-
-    if (!Services.prefs.getBoolPref(PREF_GETADDONS_CACHE_ENABLED)) {
-      return setURL(url);
-    }
-
-    gPendingInitializations++;
-    let aAddons = await AddonManager.getAddonsByTypes(["extension", "theme"]);
-    var list = {};
-    for (let addon of aAddons) {
-      var prefName = PREF_GETADDONS_CACHE_ID_ENABLED.replace("%ID%", addon.id);
-      try {
-        if (!Services.prefs.getBoolPref(prefName)) {
-          continue;
-        }
-      } catch (e) {}
-      list[addon.id] = {
-        name: addon.name,
-        version: addon.version,
-        type: addon.type,
-        userDisabled: addon.userDisabled,
-        isCompatible: addon.isCompatible,
-        isBlocklisted:
-          addon.blocklistState == Ci.nsIBlocklistService.STATE_BLOCKED,
-      };
-    }
-
-    return setURL(url + "#" + JSON.stringify(list));
-  },
-
-  destroy() {
-    try {
-      this._browser.removeProgressListener(this);
-    } catch (e) {
-      // Ignore the case when the listener wasn't already registered
-    }
-  },
-
-  async show(aParam, aRequest, aState, aIsRefresh) {
-    // If we're being told to load a specific URL then just do that
-    if (aState && "url" in aState) {
-      this.loaded = true;
-      this._loadURL(aState.url);
-    }
-
-    // If the view has loaded before and still at the homepage (if refreshing),
-    // and the error page is not visible then there is nothing else to do
-    if (
-      this.loaded &&
-      this.node.selectedPanel != this._error &&
-      (!aIsRefresh ||
-        (this._browser.currentURI &&
-          this._browser.currentURI.spec == this.homepageURL.spec))
-    ) {
-      gViewController.notifyViewChanged();
-      return;
-    }
-
-    this.loaded = true;
-
-    // No homepage means initialization isn't complete, the browser will get
-    // loaded once initialization is complete
-    if (!this.homepageURL) {
-      this._loadListeners.push(
-        gViewController.notifyViewChanged.bind(gViewController)
-      );
-      return;
-    }
-
-    this._loadURL(
-      this.homepageURL.spec,
-      aIsRefresh,
-      gViewController.notifyViewChanged.bind(gViewController),
-      Services.scriptSecurityManager.getSystemPrincipal(),
-      await this.getClientHeader()
-    );
-  },
-
-  canRefresh() {
-    if (
-      this._browser.currentURI &&
-      this._browser.currentURI.spec == this.homepageURL.spec
-    ) {
-      return false;
-    }
-    return true;
-  },
-
-  refresh(aParam, aRequest, aState) {
-    this.show(aParam, aRequest, aState, true);
-  },
-
-  hide() {},
-
-  showError() {
-    this.node.selectedPanel = this._error;
-  },
-
-  _loadURL(aURL, aKeepHistory, aCallback, aPrincipal, headers) {
-    if (this._browser.currentURI && this._browser.currentURI.spec == aURL) {
-      if (aCallback) {
-        aCallback();
-      }
-      return;
-    }
-
-    if (aCallback) {
-      this._loadListeners.push(aCallback);
-    }
-
-    var flags = 0;
-    if (!aKeepHistory) {
-      flags |= Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY;
-    }
-
-    this._browser.loadURI(aURL, {
-      flags,
-      triggeringPrincipal:
-        aPrincipal || Services.scriptSecurityManager.createNullPrincipal({}),
-      headers,
-    });
-  },
-
-  onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {
-    // Ignore the about:blank load
-    if (aLocation.spec == "about:blank") {
-      return;
-    }
-
-    // When using the real session history the inner-frame will update the
-    // session history automatically, if using the fake history though it must
-    // be manually updated
-    if (gHistory == FakeHistory) {
-      var docshell = aWebProgress.QueryInterface(Ci.nsIDocShell);
-
-      var state = {
-        view: "addons://discover/",
-        url: aLocation.spec,
-      };
-
-      var replaceHistory = Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY << 16;
-      if (docshell.loadType & replaceHistory) {
-        gHistory.replaceState(state);
-      } else {
-        gHistory.pushState(state);
-      }
-      gViewController.lastHistoryIndex = gHistory.index;
-    }
-
-    // If the hostname is the same as the new location's host and either the
-    // default scheme is insecure or the new location is secure then continue
-    // with the load
-    if (
-      aLocation.host == this.homepageURL.host &&
-      (!this.homepageURL.schemeIs("https") || aLocation.schemeIs("https"))
-    ) {
-      return;
-    }
-
-    // Canceling the request will send an error to onStateChange which will show
-    // the error page
-    aRequest.cancel(Cr.NS_BINDING_ABORTED);
-  },
-
-  onSecurityChange(aWebProgress, aRequest, aState) {
-    // Don't care about security if the page is not https
-    if (!this.homepageURL.schemeIs("https")) {
-      return;
-    }
-
-    // If the request was secure then it is ok
-    if (aState & Ci.nsIWebProgressListener.STATE_IS_SECURE) {
-      return;
-    }
-
-    // Canceling the request will send an error to onStateChange which will show
-    // the error page
-    aRequest.cancel(Cr.NS_BINDING_ABORTED);
-  },
-
-  onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
-    let transferStart =
-      Ci.nsIWebProgressListener.STATE_IS_DOCUMENT |
-      Ci.nsIWebProgressListener.STATE_IS_REQUEST |
-      Ci.nsIWebProgressListener.STATE_TRANSFERRING;
-    // Once transferring begins show the content
-    if ((aStateFlags & transferStart) === transferStart) {
-      this.node.selectedPanel = this._browser;
-    }
-
-    // Only care about the network events
-    if (!(aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK)) {
-      return;
-    }
-
-    // If this is the start of network activity then show the loading page
-    if (aStateFlags & Ci.nsIWebProgressListener.STATE_START) {
-      this.node.selectedPanel = this._loading;
-    }
-
-    // Ignore anything except stop events
-    if (!(aStateFlags & Ci.nsIWebProgressListener.STATE_STOP)) {
-      return;
-    }
-
-    // Consider the successful load of about:blank as still loading
-    if (
-      aRequest instanceof Ci.nsIChannel &&
-      aRequest.URI.spec == "about:blank"
-    ) {
-      return;
-    }
-
-    // If there was an error loading the page or the new hostname is not the
-    // same as the default hostname or the default scheme is secure and the new
-    // scheme is insecure then show the error page
-    const NS_ERROR_PARSED_DATA_CACHED = 0x805d0021;
-    if (
-      !(
-        Components.isSuccessCode(aStatus) ||
-        aStatus == NS_ERROR_PARSED_DATA_CACHED
-      ) ||
-      (aRequest &&
-        aRequest instanceof Ci.nsIHttpChannel &&
-        !aRequest.requestSucceeded)
-    ) {
-      this.showError();
-    } else {
-      // Got a successful load, make sure the browser is visible
-      this.node.selectedPanel = this._browser;
-    }
-
-    var listeners = this._loadListeners;
-    this._loadListeners = [];
-
-    for (let listener of listeners) {
-      listener();
-    }
-  },
-
-  QueryInterface: ChromeUtils.generateQI([
-    Ci.nsIWebProgressListener,
-    Ci.nsISupportsWeakReference,
-  ]),
-
-  getSelectedAddon() {
-    return null;
-  },
-};
-
 var gUpdatesView = {
   _categoryItem: null,
   isRoot: true,
 
   initialize() {
     this._categoryItem = gCategories.get("addons://updates/available");
     this.updateAvailableCount(true);
 
--- a/toolkit/mozapps/extensions/content/extensions.xul
+++ b/toolkit/mozapps/extensions/content/extensions.xul
@@ -77,47 +77,16 @@
           </hbox>
         </label>
       </hbox>
     </vbox>
 
     <vbox class="main-content" flex="1">
       <!-- view port -->
       <deck id="view-port" flex="1" selectedIndex="0">
-        <!-- discover view -->
-        <deck id="discover-view" flex="1" class="view-pane" selectedIndex="0">
-          <vbox id="discover-loading" align="center" pack="stretch" flex="1" class="alert-container">
-            <spacer class="alert-spacer-before"/>
-            <hbox class="alert loading" align="center">
-              <image/>
-              <label data-l10n-id="loading-label"/>
-            </hbox>
-            <spacer class="alert-spacer-after"/>
-          </vbox>
-          <vbox id="discover-error" align="center" pack="stretch" flex="1" class="alert-container">
-            <spacer class="alert-spacer-before"/>
-            <hbox>
-              <spacer class="discover-spacer-before"/>
-              <vbox class="alert" align="center">
-                <image class="discover-logo"/>
-                <vbox flex="1" align="stretch">
-                  <label class="discover-title" data-l10n-id="discover-title"></label>
-                  <description class="discover-description" data-l10n-id="discover-description"></description>
-                  <description class="discover-footer" data-l10n-id="discover-footer"></description>
-                </vbox>
-              </vbox>
-              <spacer class="discover-spacer-after"/>
-            </hbox>
-            <spacer class="alert-spacer-after"/>
-          </vbox>
-
-          <browser id="discover-browser" type="content" flex="1"
-                   disablehistory="true"/>
-        </deck>
-
         <!-- container for views with the search/tools header -->
         <vbox id="headered-views" flex="1">
           <deck id="headered-views-content" flex="1" selectedIndex="0">
             <vbox id="html-view" flex="1">
               <browser id="html-view-browser" type="content" flex="1" disablehistory="true"/>
             </vbox>
           </deck>
         </vbox>
--- a/toolkit/mozapps/extensions/test/browser/browser.ini
+++ b/toolkit/mozapps/extensions/test/browser/browser.ini
@@ -9,23 +9,19 @@ support-files =
   addons/browser_installssl.xpi
   addons/browser_theme.xpi
   addons/options_signed.xpi
   addons/options_signed/*
   addon_prefs.xhtml
   discovery/api_response.json
   discovery/api_response_empty.json
   discovery/small-1x1.png
-  discovery.html
   head.js
-  more_options.xhtml
-  options.xhtml
   plugin_test.html
   redirect.sjs
-  releaseNotes.xhtml
   blockNoPlugins.xml
   blockPluginHard.xml
   browser_updatessl.json
   browser_updatessl.json^headers^
   webapi_addon_listener.html
   webapi_checkavailable.html
   webapi_checkchromeframe.xhtml
   webapi_checkframed.html
@@ -53,17 +49,16 @@ skip-if = os == "linux" && debug && fiss
 skip-if = (!debug && os == 'win') #Bug 1489496
 [browser_bug567137.js]
 [browser_bug572561.js]
 [browser_bug577990.js]
 [browser_bug591465.js]
 skip-if = os == "linux" && !debug # Bug 1395539 - fails on multi-core
 [browser_bug679604.js]
 [browser_checkAddonCompatibility.js]
-[browser_discovery.js]
 [browser_dragdrop.js]
 [browser_extension_sideloading_permission.js]
 [browser_file_xpi_no_process_switch.js]
 skip-if = true # Bug 1449071 - Frequent failures
 [browser_globalwarnings.js]
 [browser_gmpProvider.js]
 [browser_history_navigation.js]
 [browser_html_abuse_report.js]
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/browser/browser_discovery.js
+++ /dev/null
@@ -1,606 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-// Tests that the discovery view loads properly
-
-const MAIN_URL = "https://example.com/" + RELATIVE_DIR + "discovery.html";
-
-var gManagerWindow;
-var gCategoryUtilities;
-var gProvider;
-
-var gLoadCompleteCallback = null;
-
-SpecialPowers.pushPrefEnv({
-  set: [["extensions.htmlaboutaddons.discover.enabled", false]],
-});
-
-var gProgressListener = {
-  onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
-    // Only care about the network stop status events
-    if (
-      !(aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) ||
-      !(aStateFlags & Ci.nsIWebProgressListener.STATE_STOP)
-    ) {
-      return;
-    }
-
-    if (gLoadCompleteCallback) {
-      executeSoon(gLoadCompleteCallback);
-    }
-    gLoadCompleteCallback = null;
-  },
-
-  onLocationChange() {},
-  onSecurityChange() {},
-  onProgressChange() {},
-  onStatusChange() {},
-  onContentBlockingEvent() {},
-
-  QueryInterface: ChromeUtils.generateQI([
-    Ci.nsIWebProgressListener,
-    Ci.nsISupportsWeakReference,
-  ]),
-};
-
-function test() {
-  // Switch to a known url
-  Services.prefs.setCharPref(PREF_DISCOVERURL, MAIN_URL);
-  // Temporarily enable caching
-  Services.prefs.setBoolPref(PREF_GETADDONS_CACHE_ENABLED, true);
-
-  waitForExplicitFinish();
-
-  gProvider = new MockProvider();
-
-  gProvider.createAddons([
-    {
-      id: "addon1@tests.mozilla.org",
-      name: "Test add-on 1",
-      type: "extension",
-      version: "2.2",
-      isCompatible: false,
-      blocklistState: Ci.nsIBlocklistService.STATE_SOFTBLOCKED,
-      userDisabled: false,
-    },
-    {
-      id: "addon3@tests.mozilla.org",
-      name: "Test add-on 3",
-      type: "theme",
-      version: "1.2b1",
-      isCompatible: false,
-      blocklistState: Ci.nsIBlocklistService.STATE_BLOCKED,
-      userDisabled: true,
-    },
-  ]);
-
-  run_next_test();
-}
-
-function end_test() {
-  finish();
-}
-
-function getURL(aBrowser) {
-  if (
-    gManagerWindow.document.getElementById("discover-view").selectedPanel !=
-    aBrowser
-  ) {
-    return null;
-  }
-
-  var url = aBrowser.currentURI.spec;
-  var pos = url.indexOf("#");
-  if (pos != -1) {
-    return url.substring(0, pos);
-  }
-  return url;
-}
-
-function getHash(aBrowser) {
-  if (
-    gManagerWindow.document.getElementById("discover-view").selectedPanel !=
-    aBrowser
-  ) {
-    return null;
-  }
-
-  var url = aBrowser.currentURI.spec;
-  var pos = url.indexOf("#");
-  if (pos != -1) {
-    return decodeURIComponent(url.substring(pos + 1));
-  }
-  return null;
-}
-
-async function testHash(aBrowser, aTestAddonVisible) {
-  var hash = getHash(aBrowser);
-  isnot(hash, null, "There should be a hash");
-  try {
-    var data = JSON.parse(hash);
-  } catch (e) {
-    ok(false, "Hash should have been valid JSON: " + e);
-    return;
-  }
-  is(typeof data, "object", "Hash should be a JS object");
-
-  // Ensure that at least the test add-ons are present
-  if (aTestAddonVisible[0]) {
-    ok("addon1@tests.mozilla.org" in data, "Test add-on 1 should be listed");
-  } else {
-    ok(
-      !("addon1@tests.mozilla.org" in data),
-      "Test add-on 1 should not be listed"
-    );
-  }
-  if (aTestAddonVisible[1]) {
-    ok("addon3@tests.mozilla.org" in data, "Test add-on 3 should be listed");
-  } else {
-    ok(
-      !("addon3@tests.mozilla.org" in data),
-      "Test add-on 3 should not be listed"
-    );
-  }
-
-  // Test against all the add-ons the manager knows about since plugins and
-  // app extensions may exist
-  let aAddons = await AddonManager.getAddonsByTypes(["extension", "theme"]);
-  for (let addon of aAddons) {
-    if (!(addon.id in data)) {
-      // Test add-ons will have shown an error if necessary above
-      if (addon.id.substring(6) != "@tests.mozilla.org") {
-        ok(false, "Add-on " + addon.id + " was not included in the data");
-      }
-      continue;
-    }
-
-    info("Testing data for add-on " + addon.id);
-    var addonData = data[addon.id];
-    is(addonData.name, addon.name, "Name should be correct");
-    is(addonData.version, addon.version, "Version should be correct");
-    is(addonData.type, addon.type, "Type should be correct");
-    is(
-      addonData.userDisabled,
-      addon.userDisabled,
-      "userDisabled should be correct"
-    );
-    is(
-      addonData.isBlocklisted,
-      addon.blocklistState == Ci.nsIBlocklistService.STATE_BLOCKED,
-      "blocklisted should be correct"
-    );
-    is(
-      addonData.isCompatible,
-      addon.isCompatible,
-      "isCompatible should be correct"
-    );
-  }
-}
-
-function isLoading() {
-  var loading =
-    gManagerWindow.document.getElementById("discover-view").selectedPanel ==
-    gManagerWindow.document.getElementById("discover-loading");
-  if (loading) {
-    is_element_visible(
-      gManagerWindow.document.querySelector("#discover-loading .loading"),
-      "Loading message should be visible when its panel is the selected panel"
-    );
-  }
-  return loading;
-}
-
-function isError() {
-  return (
-    gManagerWindow.document.getElementById("discover-view").selectedPanel ==
-    gManagerWindow.document.getElementById("discover-error")
-  );
-}
-
-function clickLink(aId, aCallback) {
-  let promise = new Promise(resolve => {
-    var browser = gManagerWindow.document.getElementById("discover-browser");
-    browser.addProgressListener(gProgressListener);
-
-    gLoadCompleteCallback = function() {
-      browser.removeProgressListener(gProgressListener);
-      resolve();
-    };
-
-    var link = browser.contentDocument.getElementById(aId);
-    EventUtils.sendMouseEvent({ type: "click" }, link);
-
-    executeSoon(function() {
-      ok(isLoading(), "Clicking link " + aId + " should show the loading pane");
-    });
-  });
-  if (aCallback) {
-    promise.then(aCallback);
-  }
-  return promise;
-}
-
-// Tests that switching to the discovery view displays the right url
-add_test(async function() {
-  let aWindow = await open_manager("addons://list/extension");
-  gManagerWindow = aWindow;
-  gCategoryUtilities = new CategoryUtilities(gManagerWindow);
-
-  await gCategoryUtilities.openType("discover");
-  var browser = gManagerWindow.document.getElementById("discover-browser");
-  is(getURL(browser), MAIN_URL, "Should have loaded the right url");
-
-  await testHash(browser, [true, true]);
-  close_manager(gManagerWindow, run_next_test);
-});
-
-// Tests that loading the add-ons manager with the discovery view as the last
-// selected view displays the right url
-add_test(async function() {
-  // Hide one of the test add-ons
-  Services.prefs.setBoolPref(
-    "extensions.addon3@tests.mozilla.org.getAddons.cache.enabled",
-    false
-  );
-  await open_manager(null, null, function(aWindow) {
-    gManagerWindow = aWindow;
-    ok(isLoading(), "Should be loading at first");
-  });
-  gCategoryUtilities = new CategoryUtilities(gManagerWindow);
-  is(
-    gCategoryUtilities.selectedCategory,
-    "discover",
-    "Should have loaded the right view"
-  );
-
-  var browser = gManagerWindow.document.getElementById("discover-browser");
-  is(getURL(browser), MAIN_URL, "Should have loaded the right url");
-
-  await testHash(browser, [true, false]);
-  close_manager(gManagerWindow, run_next_test);
-});
-
-// Tests that loading the add-ons manager with the discovery view as the initial
-// view displays the right url
-add_test(async function() {
-  Services.prefs.clearUserPref(
-    "extensions.addon3@tests.mozilla.org.getAddons.cache.enabled"
-  );
-  let aWindow = await open_manager(null);
-  gManagerWindow = aWindow;
-  gCategoryUtilities = new CategoryUtilities(gManagerWindow);
-  await gCategoryUtilities.openType("extension");
-  await close_manager(gManagerWindow);
-  aWindow = await open_manager("addons://discover/", null, function(aWindow) {
-    gManagerWindow = aWindow;
-    ok(isLoading(), "Should be loading at first");
-  });
-  gCategoryUtilities = new CategoryUtilities(gManagerWindow);
-  is(
-    gCategoryUtilities.selectedCategory,
-    "discover",
-    "Should have loaded the right view"
-  );
-
-  var browser = gManagerWindow.document.getElementById("discover-browser");
-  is(getURL(browser), MAIN_URL, "Should have loaded the right url");
-
-  await testHash(browser, [true, true]);
-
-  close_manager(gManagerWindow, run_next_test);
-});
-
-// Tests that switching to the discovery view displays the right url
-add_test(async function() {
-  Services.prefs.setBoolPref(PREF_GETADDONS_CACHE_ENABLED, false);
-
-  let aWindow = await open_manager("addons://list/extension");
-  gManagerWindow = aWindow;
-  gCategoryUtilities = new CategoryUtilities(gManagerWindow);
-
-  await gCategoryUtilities.openType("discover");
-  var browser = gManagerWindow.document.getElementById("discover-browser");
-  is(getURL(browser), MAIN_URL, "Should have loaded the right url");
-
-  is(getHash(browser), null, "Hash should not have been passed");
-  close_manager(gManagerWindow, run_next_test);
-});
-
-// Tests that loading the add-ons manager with the discovery view as the last
-// selected view displays the right url
-add_test(async function() {
-  let aWindow = await open_manager(null);
-  gManagerWindow = aWindow;
-  gCategoryUtilities = new CategoryUtilities(gManagerWindow);
-  is(
-    gCategoryUtilities.selectedCategory,
-    "discover",
-    "Should have loaded the right view"
-  );
-
-  var browser = gManagerWindow.document.getElementById("discover-browser");
-  is(getURL(browser), MAIN_URL, "Should have loaded the right url");
-
-  is(getHash(browser), null, "Hash should not have been passed");
-  close_manager(gManagerWindow, run_next_test);
-});
-
-// Tests that loading the add-ons manager with the discovery view as the initial
-// view displays the right url
-add_test(async function() {
-  let aWindow = await open_manager(null);
-  gManagerWindow = aWindow;
-  gCategoryUtilities = new CategoryUtilities(gManagerWindow);
-  await gCategoryUtilities.openType("extension");
-  await close_manager(gManagerWindow);
-  aWindow = await open_manager("addons://discover/");
-  gManagerWindow = aWindow;
-  gCategoryUtilities = new CategoryUtilities(gManagerWindow);
-  is(
-    gCategoryUtilities.selectedCategory,
-    "discover",
-    "Should have loaded the right view"
-  );
-
-  var browser = gManagerWindow.document.getElementById("discover-browser");
-  is(getURL(browser), MAIN_URL, "Should have loaded the right url");
-
-  is(getHash(browser), null, "Hash should not have been passed");
-  close_manager(gManagerWindow, run_next_test);
-});
-
-// Tests that navigating to a page on the same domain works
-add_test(async function() {
-  let aWindow = await open_manager("addons://discover/");
-  gManagerWindow = aWindow;
-  gCategoryUtilities = new CategoryUtilities(gManagerWindow);
-
-  var browser = gManagerWindow.document.getElementById("discover-browser");
-  is(getURL(browser), MAIN_URL, "Should have loaded the right url");
-
-  await clickLink("link-good");
-  is(
-    getURL(browser),
-    "https://example.com/" + RELATIVE_DIR + "releaseNotes.xhtml",
-    "Should have loaded the right url"
-  );
-
-  await gCategoryUtilities.openType("extension");
-  await gCategoryUtilities.openType("discover");
-  is(getURL(browser), MAIN_URL, "Should have loaded the right url");
-
-  close_manager(gManagerWindow, run_next_test);
-});
-
-// Loading an insecure main page should work if that is what the prefs say, should
-// also be able to navigate to a https page and back again
-add_test(async function() {
-  Services.prefs.setCharPref(PREF_DISCOVERURL, TESTROOT + "discovery.html");
-
-  let aWindow = await open_manager("addons://discover/");
-  gManagerWindow = aWindow;
-  gCategoryUtilities = new CategoryUtilities(gManagerWindow);
-
-  var browser = gManagerWindow.document.getElementById("discover-browser");
-  is(
-    getURL(browser),
-    TESTROOT + "discovery.html",
-    "Should have loaded the right url"
-  );
-
-  close_manager(gManagerWindow, run_next_test);
-});
-
-// Stopping the initial load should display the error page and then correctly
-// reload when switching away and back again
-add_test(async function() {
-  Services.prefs.setCharPref(PREF_DISCOVERURL, MAIN_URL);
-
-  let aWindow = await open_manager("addons://list/extension");
-  gManagerWindow = aWindow;
-  gCategoryUtilities = new CategoryUtilities(gManagerWindow);
-
-  var browser = gManagerWindow.document.getElementById("discover-browser");
-
-  EventUtils.synthesizeMouse(
-    gCategoryUtilities.get("discover"),
-    2,
-    2,
-    {},
-    gManagerWindow
-  );
-
-  // Do this after wait_for_view_load has had a chance to setup its
-  // listeners.
-  executeSoon(() => {
-    ok(isLoading(), "Should be loading");
-    // This will actually stop the about:blank load
-    browser.stop();
-  });
-
-  await wait_for_view_load(gManagerWindow);
-  ok(isError(), "Should have shown the error page");
-
-  await gCategoryUtilities.openType("extension");
-  EventUtils.synthesizeMouse(
-    gCategoryUtilities.get("discover"),
-    2,
-    2,
-    {},
-    gManagerWindow
-  );
-
-  // Do this after wait_for_view_load has had a chance to setup its
-  // listeners.
-  executeSoon(() => {
-    ok(isLoading(), "Should be loading");
-    // This will actually stop the about:blank load
-    browser.stop();
-  });
-
-  await wait_for_view_load(gManagerWindow);
-  ok(isError(), "Should have shown the error page");
-
-  await gCategoryUtilities.openType("extension");
-  await gCategoryUtilities.openType("discover");
-  is(getURL(browser), MAIN_URL, "Should have loaded the right url");
-
-  close_manager(gManagerWindow, run_next_test);
-});
-
-// Test for Bug 703929 - Loading the discover view from a chrome XUL file fails when
-// the add-on manager is reopened.
-add_test(async function() {
-  const url =
-    "chrome://mochitests/content/" + RELATIVE_DIR + "addon_prefs.xhtml";
-  Services.prefs.setCharPref(PREF_DISCOVERURL, url);
-
-  let aWindow = await open_manager("addons://discover/");
-  gManagerWindow = aWindow;
-  gCategoryUtilities = new CategoryUtilities(gManagerWindow);
-
-  var browser = gManagerWindow.document.getElementById("discover-browser");
-  is(getURL(browser), url, "Loading a chrome XUL file should work");
-
-  aWindow = await restart_manager(gManagerWindow, "addons://discover/");
-  gManagerWindow = aWindow;
-  gCategoryUtilities = new CategoryUtilities(gManagerWindow);
-
-  browser = gManagerWindow.document.getElementById("discover-browser");
-  is(
-    getURL(browser),
-    url,
-    "Should be able to load the chrome XUL file a second time"
-  );
-
-  close_manager(gManagerWindow, run_next_test);
-});
-
-// Bug 711693 - Send the compatibility mode when loading the Discovery pane
-add_test(async function() {
-  info(
-    "Test '%COMPATIBILITY_MODE%' in the URL is correctly replaced by 'normal'"
-  );
-  Services.prefs.setCharPref(
-    PREF_DISCOVERURL,
-    MAIN_URL + "?mode=%COMPATIBILITY_MODE%"
-  );
-  Services.prefs.setBoolPref(PREF_STRICT_COMPAT, false);
-
-  let aWindow = await open_manager("addons://discover/");
-  gManagerWindow = aWindow;
-  var browser = gManagerWindow.document.getElementById("discover-browser");
-  is(
-    getURL(browser),
-    MAIN_URL + "?mode=normal",
-    "Should have loaded the right url"
-  );
-  close_manager(gManagerWindow, run_next_test);
-});
-
-add_test(async function() {
-  info(
-    "Test '%COMPATIBILITY_MODE%' in the URL is correctly replaced by 'strict'"
-  );
-  Services.prefs.setBoolPref(PREF_STRICT_COMPAT, true);
-
-  let aWindow = await open_manager("addons://discover/");
-  gManagerWindow = aWindow;
-  var browser = gManagerWindow.document.getElementById("discover-browser");
-  is(
-    getURL(browser),
-    MAIN_URL + "?mode=strict",
-    "Should have loaded the right url"
-  );
-  close_manager(gManagerWindow, run_next_test);
-});
-
-add_test(async function() {
-  info(
-    "Test '%COMPATIBILITY_MODE%' in the URL is correctly replaced by 'ignore'"
-  );
-  Services.prefs.setBoolPref(PREF_CHECK_COMPATIBILITY, false);
-
-  let aWindow = await open_manager("addons://discover/");
-  gManagerWindow = aWindow;
-  var browser = gManagerWindow.document.getElementById("discover-browser");
-  is(
-    getURL(browser),
-    MAIN_URL + "?mode=ignore",
-    "Should have loaded the right url"
-  );
-  close_manager(gManagerWindow, run_next_test);
-});
-
-// Test for Bug 601442 - extensions.getAddons.showPane need to be update
-// for the new addon manager.
-async function bug_601442_test_elements(visible) {
-  let aWindow = await open_manager("addons://list/extension");
-  gManagerWindow = aWindow;
-  gCategoryUtilities = new CategoryUtilities(gManagerWindow);
-  if (visible) {
-    ok(
-      gCategoryUtilities.isTypeVisible("discover"),
-      "Discover category should be visible"
-    );
-  } else {
-    ok(
-      !gCategoryUtilities.isTypeVisible("discover"),
-      "Discover category should not be visible"
-    );
-  }
-  close_manager(gManagerWindow, run_next_test);
-}
-
-add_test(function() {
-  Services.prefs.setBoolPref(PREF_DISCOVER_ENABLED, false);
-  Services.prefs.setBoolPref(PREF_XPI_ENABLED, true);
-  bug_601442_test_elements(false);
-});
-add_test(function() {
-  Services.prefs.setBoolPref(PREF_DISCOVER_ENABLED, true);
-  Services.prefs.setBoolPref(PREF_XPI_ENABLED, false);
-  bug_601442_test_elements(false);
-});
-add_test(function() {
-  Services.prefs.setBoolPref(PREF_DISCOVER_ENABLED, false);
-  Services.prefs.setBoolPref(PREF_XPI_ENABLED, false);
-  bug_601442_test_elements(false);
-});
-add_test(function() {
-  Services.prefs.setBoolPref(PREF_DISCOVER_ENABLED, true);
-  Services.prefs.setBoolPref(PREF_XPI_ENABLED, true);
-  bug_601442_test_elements(true);
-});
-
-// Test for Bug 1132971 - if extensions.getAddons.showPane is false,
-// the extensions pane should show by default
-add_test(async function() {
-  Services.prefs.clearUserPref(PREF_UI_LASTCATEGORY);
-  Services.prefs.setBoolPref(PREF_DISCOVER_ENABLED, false);
-
-  let aWindow = await open_manager(null);
-  gManagerWindow = aWindow;
-  gCategoryUtilities = new CategoryUtilities(gManagerWindow);
-  is(
-    gCategoryUtilities.selectedCategory,
-    "extension",
-    "Should be showing the extension view"
-  );
-  close_manager(gManagerWindow, run_next_test);
-  Services.prefs.clearUserPref(PREF_DISCOVER_ENABLED);
-});
-
-// Test for Bug 1219495 - should show placeholder content when offline
-add_test(async function() {
-  // set a URL to cause an error
-  Services.prefs.setCharPref(PREF_DISCOVERURL, "https://nocert.example.com/");
-
-  let aWindow = await open_manager("addons://discover/");
-  gManagerWindow = aWindow;
-
-  ok(isError(), "Should have shown the placeholder content");
-
-  close_manager(gManagerWindow, run_next_test);
-});
--- a/toolkit/mozapps/extensions/test/browser/browser_history_navigation.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_history_navigation.js
@@ -109,46 +109,26 @@ function is_in_detail(aManager, view, ca
     1,
     "Got a detail-view in the HTML about:addons browser"
   );
 
   check_state(canGoBack, canGoForward);
 }
 
 function is_in_discovery(aManager, url, canGoBack, canGoForward) {
-  if (
-    Services.prefs.getBoolPref("extensions.htmlaboutaddons.discover.enabled")
-  ) {
-    is(
-      get_current_view(aManager).id,
-      "html-view",
-      "the current view should be set to the HTML about:addons browser"
-    );
-    const doc = aManager.getHtmlBrowser().contentDocument;
-    ok(
-      doc.querySelector("discovery-pane"),
-      "Got a discovery panel in the HTML about:addons browser"
-    );
-  } else {
-    var browser = aManager.document.getElementById("discover-browser");
-
-    is(
-      aManager.document.getElementById("discover-view").selectedPanel,
-      browser,
-      "Browser should be visible"
-    );
-
-    var spec = browser.currentURI.spec;
-    var pos = spec.indexOf("#");
-    if (pos != -1) {
-      spec = spec.substring(0, pos);
-    }
-
-    is(spec, url, "Should have loaded the right url");
-  }
+  is(
+    get_current_view(aManager).id,
+    "html-view",
+    "the current view should be set to the HTML about:addons browser"
+  );
+  const doc = aManager.getHtmlBrowser().contentDocument;
+  ok(
+    doc.querySelector("discovery-pane"),
+    "Got a discovery panel in the HTML about:addons browser"
+  );
 
   check_state(canGoBack, canGoForward);
 }
 
 async function expand_addon_element(aManager, aId) {
   var addon = get_addon_element(aManager, aId);
   addon.click();
 }
@@ -565,20 +545,17 @@ add_task(async function test_open_last_v
   is_in_list(aManager, "addons://list/plugin", false, false);
 
   await close_manager(aManager);
 });
 
 // Tests that navigating the discovery page works when that was the first view
 add_task(async function test_discopane_first_history_entry() {
   await SpecialPowers.pushPrefEnv({
-    set: [
-      ["extensions.htmlaboutaddons.discover.enabled", true],
-      ["extensions.getAddons.discovery.api_url", DISCOAPI_URL],
-    ],
+    set: [["extensions.getAddons.discovery.api_url", DISCOAPI_URL]],
   });
 
   let aManager = await open_manager("addons://discover/");
   info("1");
   is_in_discovery(aManager, MAIN_URL, false, false);
 
   EventUtils.synthesizeMouseAtCenter(
     aManager.document.getElementById("category-plugin"),
--- a/toolkit/mozapps/extensions/test/browser/browser_html_discover_view.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_html_discover_view.js
@@ -289,17 +289,16 @@ async function testAddonUninstall(card) 
 
 add_task(async function setup() {
   await SpecialPowers.pushPrefEnv({
     set: [
       [
         "extensions.getAddons.discovery.api_url",
         `http://${AMO_TEST_HOST}/discoapi`,
       ],
-      ["extensions.htmlaboutaddons.discover.enabled", true],
       // Disable non-discopane recommendations to avoid unexpected discovery
       // API requests.
       ["extensions.htmlaboutaddons.recommendations.enabled", false],
       // Disable the telemetry client ID (and its associated UI warning).
       // browser_html_discover_view_clientid.js covers this functionality.
       ["browser.discovery.enabled", false],
     ],
   });
--- a/toolkit/mozapps/extensions/test/browser/browser_html_discover_view_clientid.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_html_discover_view_clientid.js
@@ -42,17 +42,16 @@ function isNoticeVisible(win) {
 add_task(async function setup() {
   await SpecialPowers.pushPrefEnv({
     set: [
       // Enable clientid - see Discovery.jsm for the first two prefs.
       ["browser.discovery.enabled", true],
       ["datareporting.healthreport.uploadEnabled", true],
       ["extensions.getAddons.discovery.api_url", `${serverBaseUrl}discoapi`],
       ["app.support.baseURL", `${serverBaseUrl}sumo/`],
-      ["extensions.htmlaboutaddons.discover.enabled", true],
       // Discovery API requests can be triggered by the discopane and the
       // recommendations in the list view. To make sure that the every test
       // checks the behavior of the view they're testing, ensure that only one
       // of the two views is enabled at a time.
       ["extensions.htmlaboutaddons.recommendations.enabled", false],
     ],
   });
 });
@@ -157,18 +156,18 @@ add_task(async function clientid_from_pr
   await close_manager(managerWindow);
   await BrowserTestUtils.closeWindow(privateWindow);
 });
 
 add_task(async function clientid_enabled_from_extension_list() {
   await SpecialPowers.pushPrefEnv({
     // Override prefs from setup to enable recommendations.
     set: [
-      ["extensions.htmlaboutaddons.discover.enabled", false],
       ["extensions.htmlaboutaddons.recommendations.enabled", true],
+      ["extensions.getAddons.showPane", false],
     ],
   });
 
   // Force the extension list to be the first load. This pref will be
   // overwritten once the view loads.
   Services.prefs.setCharPref(PREF_UI_LASTCATEGORY, "addons://list/extension");
 
   let requestPromise = promiseOneDiscoveryApiRequest();
@@ -192,18 +191,18 @@ add_task(async function clientid_enabled
   await closeView(win);
   await SpecialPowers.popPrefEnv();
 });
 
 add_task(async function clientid_enabled_from_theme_list() {
   await SpecialPowers.pushPrefEnv({
     // Override prefs from setup to enable recommendations.
     set: [
-      ["extensions.htmlaboutaddons.discover.enabled", false],
       ["extensions.htmlaboutaddons.recommendations.enabled", true],
+      ["extensions.getAddons.showPane", false],
     ],
   });
 
   // Force the theme list to be the first load. This pref will be overwritten
   // once the view loads.
   Services.prefs.setCharPref(PREF_UI_LASTCATEGORY, "addons://list/theme");
 
   let requestPromise = promiseOneDiscoveryApiRequest();
--- a/toolkit/mozapps/extensions/test/browser/browser_html_discover_view_prefs.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_html_discover_view_prefs.js
@@ -51,17 +51,16 @@ async function checkIfDiscoverVisible(ex
 
   await close_manager(managerWindow);
 }
 
 add_task(async function setup() {
   await SpecialPowers.pushPrefEnv({
     set: [
       ["extensions.getAddons.discovery.api_url", TEST_API_URL],
-      ["extensions.htmlaboutaddons.discover.enabled", true],
       // Disable recommendations at the HTML about:addons view to avoid sending
       // a discovery API request from the fallback view (extension list) in the
       // showPane_false test.
       ["extensions.htmlaboutaddons.recommendations.enabled", false],
     ],
   });
 });
 
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/browser/discovery.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-<body>
-  <h1>Test page for the discovery pane</h1>
-  <p><a id="link-normal" href="https://example.com/browser/toolkit/mozapps/extensions/test/browser/discovery.html">Load normal</a></p>
-  <p><a id="link-http" href="http://example.com/browser/toolkit/mozapps/extensions/test/browser/discovery.html">Load insecure</a></p>
-  <p><a id="link-domain" href="https://test1.example.com/browser/toolkit/mozapps/extensions/test/browser/discovery.html">Load other domain</a></p>
-  <p><a id="link-bad" href="https://example.com/browser/toolkit/mozapps/extensions/test/browser/foo.html">Load missing page</a></p>
-  <p><a id="link-good" href="https://example.com/browser/toolkit/mozapps/extensions/test/browser/releaseNotes.xhtml">Load other page</a></p>
-</body>
-</html>
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/browser/more_options.xhtml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" ?>
-<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <setting pref="extensions.inlinesettings3.radioBool" type="radio" title="Radio">
-    <radiogroup>
-      <radio label="Delta" value="true" />
-      <radio label="Echo" value="false" />
-    </radiogroup>
-  </setting>
-  <setting pref="extensions.inlinesettings3.radioInt" type="radio" title="Radio">
-    <radiogroup>
-      <radio label="Foxtrot" value="4" />
-      <radio label="Golf" value="5" />
-      <radio label="Hotel" value="6" />
-    </radiogroup>
-  </setting>
-  <setting pref="extensions.inlinesettings3.radioString" type="radio" title="Radio">
-    <radiogroup>
-      <radio label="India" value="india" />
-      <radio label="Juliet" value="juliet" />
-      <radio label="Kilo &#x338F;" value="kilo &#x338F;" />
-    </radiogroup>
-  </setting>
-  <setting pref="extensions.inlinesettings3.menulist" type="menulist" title="Menulist">
-    <menulist sizetopopup="always">
-      <menupopup>
-        <menuitem label="Lima" value="7" />
-        <menuitem label="Mike" value="8" />
-        <menuitem label="November" value="9" />
-      </menupopup>
-    </menulist>
-  </setting>
-</vbox>
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/browser/options.xhtml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" ?>
-<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <setting />
-  <setting pref="extensions.inlinesettings2.bool1" type="bool" title="Bool 1" desc="Description Attribute"/>
-  <setting pref="extensions.inlinesettings2.bool2" type="bool" title="Bool 2">Description Text Node</setting>
-  <setting type="control" title="Button">
-    This is a test, <button label="button" />all this text should be visible
-  </setting>
-  <setting type="unsupported">
-    This setting should never appear
-  </setting>
-</vbox>
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/browser/releaseNotes.xhtml
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html lang="en-US" dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
-<head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-    <title></title>
-</head>
-
-<body>
-  <h1>OMG, an update!!!!</h1>
-  <ul>
-    <li>Made everything more awesome</li>
-    <li>Added hot sauce</li>
-  </ul>
-</body>
-</html>
deleted file mode 100644
index 40ea75567f915b0f5d396b155849ef36d30ef6b6..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
--- a/toolkit/themes/osx/mozapps/jar.mn
+++ b/toolkit/themes/osx/mozapps/jar.mn
@@ -1,17 +1,16 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 toolkit.jar:
 #include ../../shared/mozapps.inc.mn
   skin/classic/mozapps/downloads/buttons.png                      (downloads/buttons.png)
   skin/classic/mozapps/downloads/unknownContentType.css           (downloads/unknownContentType.css)
-  skin/classic/mozapps/extensions/discover-logo.png               (extensions/discover-logo.png)
   skin/classic/mozapps/extensions/rating-won.png                  (extensions/rating-won.png)
   skin/classic/mozapps/extensions/rating-not-won.png              (extensions/rating-not-won.png)
   skin/classic/mozapps/extensions/cancel.png                      (extensions/cancel.png)
 * skin/classic/mozapps/extensions/extensions.css                  (extensions/extensions.css)
   skin/classic/mozapps/extensions/blocklist.css                   (extensions/blocklist.css)
   skin/classic/mozapps/profile/profileSelection.css               (profile/profileSelection.css)
 * skin/classic/mozapps/update/updates.css                         (update/updates.css)
   skin/classic/mozapps/handling/handling.css                      (handling/handling.css)
--- a/toolkit/themes/shared/extensions/extensions.inc.css
+++ b/toolkit/themes/shared/extensions/extensions.inc.css
@@ -318,49 +318,16 @@ button.warning {
   margin-top: 5px;
 }
 
 .heading-inner {
   width: 664px;
   margin-inline-start: 28px;
 }
 
-/*** discover view ***/
-
-.discover-spacer-before,
-.discover-spacer-after {
-  -moz-box-flex: 1;
-}
-
-#discover-error .alert {
-  max-width: 45em;
-  -moz-box-flex: 1;
-}
-
-.discover-logo {
-  list-style-image: url("chrome://mozapps/skin/extensions/discover-logo.png");
-  margin-inline-end: 15px;
-}
-
-.discover-title {
-  font-weight: bold;
-  font-size: 24px;
-  font-family: MetaWebPro-Book, "Trebuchet MS", sans-serif;
-  margin: 0 0 15px 0;
-}
-
-.discover-description {
-  text-align: justify;
-  margin: 0 0 15px 0;
-}
-
-.discover-footer {
-  text-align: justify;
-}
-
 
 /*** list ***/
 
 .list {
   -moz-appearance: none;
   margin: 0;
   border-width: 0 !important;
   background-color: transparent;
--- a/toolkit/themes/shared/non-mac.jar.inc.mn
+++ b/toolkit/themes/shared/non-mac.jar.inc.mn
@@ -23,16 +23,15 @@
   skin/classic/global/icons/question-16.png                (../../windows/global/icons/question-16.png)
   skin/classic/global/icons/question-64.png                (../../windows/global/icons/question-64.png)
   skin/classic/global/icons/search-textbox.svg             (../../windows/global/icons/search-textbox.svg)
   skin/classic/global/plugins/pluginHelp-16.png            (../../windows/global/plugins/pluginHelp-16.png)
 
   skin/classic/mozapps/downloads/downloadButtons.png         (../../windows/mozapps/downloads/downloadButtons.png)
   skin/classic/mozapps/downloads/unknownContentType.css      (../../windows/mozapps/downloads/unknownContentType.css)
   skin/classic/mozapps/extensions/blocklist.css              (../../windows/mozapps/extensions/blocklist.css)
-  skin/classic/mozapps/extensions/discover-logo.png          (../../windows/mozapps/extensions/discover-logo.png)
   skin/classic/mozapps/extensions/rating-won.png             (../../windows/mozapps/extensions/rating-won.png)
   skin/classic/mozapps/extensions/rating-not-won.png         (../../windows/mozapps/extensions/rating-not-won.png)
   skin/classic/mozapps/extensions/cancel.png                 (../../windows/mozapps/extensions/cancel.png)
   skin/classic/mozapps/handling/handling.css                 (../../windows/mozapps/handling/handling.css)
   skin/classic/mozapps/profile/profileSelection.css          (../../windows/mozapps/profile/profileSelection.css)
 
 % override chrome://mozapps/skin/xpinstall/xpinstallItemGeneric.png       chrome://mozapps/skin/extensions/extensionGeneric.svg
deleted file mode 100644
index 40ea75567f915b0f5d396b155849ef36d30ef6b6..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001