Bug 1620438 - Remove references to extensions.webservice.discoverURL. r=robwu,remote-protocol-reviewers,marionette-reviewers,perftest-reviewers,whimboo,sparky
authorjayati <gaurijove@gmail.com>
Mon, 27 Apr 2020 14:36:04 +0000
changeset 526346 03da091fad184693bafd49c70b1c1fd411b33ce2
parent 526345 7b5f7ee72a6cd4b134537e4d789bbe298e2ca9a0
child 526347 7b6dbbb27b74931c9cc32b5c6ea59ec86f48cefa
push id114219
push userapavel@mozilla.com
push dateMon, 27 Apr 2020 21:39:51 +0000
treeherderautoland@03da091fad18 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrobwu, remote-protocol-reviewers, marionette-reviewers, perftest-reviewers, whimboo, sparky
bugs1620438
milestone77.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1620438 - Remove references to extensions.webservice.discoverURL. r=robwu,remote-protocol-reviewers,marionette-reviewers,perftest-reviewers,whimboo,sparky Differential Revision: https://phabricator.services.mozilla.com/D71203
browser/app/profile/firefox.js
remote/test/puppeteer/experimental/puppeteer-firefox/misc/puppeteer.cfg
remote/test/puppeteer/lib/Launcher.js
testing/marionette/client/marionette_driver/geckoinstance.py
testing/marionette/components/marionette.js
testing/profiles/perf/user.js
testing/profiles/unittest-required/user.js
testing/talos/talos/unittests/test_talosconfig_browser_config.json
toolkit/mozapps/extensions/content/aboutaddonsCommon.js
toolkit/mozapps/extensions/test/browser/browser_history_navigation.js
toolkit/mozapps/extensions/test/browser/head.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -33,17 +33,16 @@ pref("extensions.checkCompatibility.temp
 
 pref("extensions.webextPermissionPrompts", true);
 pref("extensions.webextOptionalPermissionPrompts", true);
 
 // Preferences for AMO integration
 pref("extensions.getAddons.cache.enabled", true);
 pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/api/v3/addons/search/?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%");
 
 // 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");
--- a/remote/test/puppeteer/experimental/puppeteer-firefox/misc/puppeteer.cfg
+++ b/remote/test/puppeteer/experimental/puppeteer-firefox/misc/puppeteer.cfg
@@ -137,20 +137,17 @@ pref("extensions.getAddons.cache.enabled
 // Disable installing any distribution extensions or add-ons.
 pref("extensions.installDistroAddons", false);
 
 // Turn off extension updates so they do not bother tests
 pref("extensions.update.enabled", false);
 pref("extensions.update.notifyUser", false);
 
 // Make sure opening about:addons will not hit the network
-pref(
-  "extensions.webservice.discoverURL",
-  "http://%(server)s/dummy/discoveryURL",
-);
+pref("extensions.getAddons.discovery.api_url","data:, ");
 
 pref("extensions.screenshots.disabled", true);
 pref("extensions.screenshots.upload-disabled", true);
 
 // Allow the application to have focus even it runs in the background
 pref("focusmanager.testmode", true);
 
 // Disable useragent updates
--- a/remote/test/puppeteer/lib/Launcher.js
+++ b/remote/test/puppeteer/lib/Launcher.js
@@ -633,17 +633,17 @@ class FirefoxLauncher {
 
       // Turn off extension updates so they do not bother tests
       'extensions.update.enabled': false,
 
       // Turn off extension updates so they do not bother tests
       'extensions.update.notifyUser': false,
 
       // Make sure opening about:addons will not hit the network
-      'extensions.webservice.discoverURL': `http://${server}/dummy/discoveryURL`,
+      'extensions.getAddons.discovery.api_url': 'data:, ',
 
       // Allow the application to have focus even it runs in the background
       'focusmanager.testmode': true,
       // Disable useragent updates
       'general.useragent.updates.enabled': false,
       // Always use network provider for geolocation tests so we bypass the
       // macOS dialog raised by the corelocation provider
       'geo.provider.testing': true,
--- a/testing/marionette/client/marionette_driver/geckoinstance.py
+++ b/testing/marionette/client/marionette_driver/geckoinstance.py
@@ -72,17 +72,17 @@ class GeckoInstance(object):
         "extensions.getAddons.cache.enabled": False,
         # Disable intalling any distribution add-ons
         "extensions.installDistroAddons": False,
 
         # Turn off extension updates so they don't bother tests
         "extensions.update.enabled": False,
         "extensions.update.notifyUser": False,
         # Make sure opening about:addons won"t hit the network
-        "extensions.webservice.discoverURL": "http://%(server)s/dummy/discoveryURL",
+        "extensions.getAddons.discovery.api_url": "data:, ",
 
         # Allow the application to have focus even it runs in the background
         "focusmanager.testmode": True,
 
         # Disable useragent updates
         "general.useragent.updates.enabled": False,
 
         # Always use network provider for geolocation tests
--- a/testing/marionette/components/marionette.js
+++ b/testing/marionette/components/marionette.js
@@ -214,17 +214,17 @@ const RECOMMENDED_PREFS = new Map([
   // Should be set in profile.
   ["extensions.installDistroAddons", false],
 
   // Turn off extension updates so they do not bother tests
   ["extensions.update.enabled", false],
   ["extensions.update.notifyUser", false],
 
   // Make sure opening about:addons will not hit the network
-  ["extensions.webservice.discoverURL", "http://%(server)s/dummy/discoveryURL"],
+  ["extensions.getAddons.discovery.api_url", "data:, "],
 
   // Allow the application to have focus even it runs in the background
   ["focusmanager.testmode", true],
 
   // Disable useragent updates
   ["general.useragent.updates.enabled", false],
 
   // Always use network provider for geolocation tests so we bypass the
--- a/testing/profiles/perf/user.js
+++ b/testing/profiles/perf/user.js
@@ -47,17 +47,16 @@ user_pref("extensions.blocklist.enabled"
 user_pref("extensions.checkCompatibility", false);
 user_pref("extensions.getAddons.get.url", "http://127.0.0.1/extensions-dummy/repositoryGetURL");
 user_pref("extensions.getAddons.search.browseURL", "http://127.0.0.1/extensions-dummy/repositoryBrowseURL");
 user_pref("extensions.hotfix.url", "http://127.0.0.1/extensions-dummy/hotfixURL");
 user_pref("extensions.systemAddon.update.url", "http://127.0.0.1/dummy-system-addons.xml");
 user_pref("extensions.update.background.url", "http://127.0.0.1/extensions-dummy/updateBackgroundURL");
 user_pref("extensions.update.notifyUser", false);
 user_pref("extensions.update.url", "http://127.0.0.1/extensions-dummy/updateURL");
-user_pref("extensions.webservice.discoverURL", "http://127.0.0.1/extensions-dummy/discoveryURL");
 user_pref("identity.fxaccounts.auth.uri", "https://127.0.0.1/fxa-dummy/");
 user_pref("identity.fxaccounts.migrateToDevEdition", false);
 // Avoid idle-daily notifications, to avoid expensive operations that may
 // cause unexpected test timeouts.
 user_pref("idle.lastDailyNotification", -1);
 user_pref("media.capturestream_hints.enabled", true);
 user_pref("media.gmp-manager.url", "http://127.0.0.1/gmpmanager-dummy/update.xml");
 // Don't block old libavcodec libraries when testing, because our test systems
--- a/testing/profiles/unittest-required/user.js
+++ b/testing/profiles/unittest-required/user.js
@@ -113,18 +113,16 @@ user_pref("extensions.hotfix.url", "http
 // Disable intalling any distribution add-ons
 user_pref("extensions.installDistroAddons", false);
 // Disable Screenshots by default for now
 user_pref("extensions.screenshots.disabled", true);
 user_pref("extensions.systemAddon.update.url", "http://{server}/dummy-system-addons.xml");
 user_pref("extensions.update.background.url", "http://{server}/extensions-dummy/updateBackgroundURL");
 // Point update checks to the local testing server for fast failures
 user_pref("extensions.update.url", "http://{server}/extensions-dummy/updateURL");
-// Make sure opening about:addons won't hit the network
-user_pref("extensions.webservice.discoverURL", "http://{server}/extensions-dummy/discoveryURL");
 user_pref("findbar.highlightAll", false);
 user_pref("findbar.modalHighlight", false);
 // Existing tests assume there is no font size inflation.
 user_pref("font.size.inflation.emPerLine", 0);
 user_pref("font.size.inflation.minTwips", 0);
 user_pref("general.useragent.updates.url", "https://example.com/0/%APP_ID%");
 // Always use network provider for geolocation tests
 // so we bypass the OSX dialog raised by the corelocation provider
--- a/testing/talos/talos/unittests/test_talosconfig_browser_config.json
+++ b/testing/talos/talos/unittests/test_talosconfig_browser_config.json
@@ -1,1 +1,1 @@
-{'deviceroot': '', 'dirs': {}, 'repository': 'https://hg.mozilla.org/releases/mozilla-release', 'buildid': '20131205075310', 'results_log': 'pathtoresults_log', 'symbols_path': None, 'bcontroller_config': 'pathtobcontroller', 'host': '', 'browser_name': 'Firefox', 'sourcestamp': '39faf812aaec', 'remote': False, 'child_process': 'plugin-container', 'browser_version': '26.0', 'extra_args': '', 'develop': True, 'preferences': {'browser.display.overlaynavbuttons': False, 'extensions.getAddons.get.url': 'http://127.0.0.1/extensions-dummy/repositoryGetURL', 'dom.max_chrome_script_run_time': 0, 'network.proxy.type': 1, 'extensions.update.background.url': 'http://127.0.0.1/extensions-dummy/updateBackgroundURL', 'network.proxy.http': 'localhost', 'plugins.update.url': 'http://127.0.0.1/plugins-dummy/updateCheckURL', 'dom.max_script_run_time': 0, 'extensions.update.enabled': False, 'browser.safebrowsing.keyURL': 'http://127.0.0.1/safebrowsing-dummy/newkey', 'media.navigator.permission.disabled': True, 'app.update.checkInstallTime': False, 'app.update.disabledForTesting': True, 'browser.EULA.override': True, 'extensions.checkCompatibility': False, 'talos.logfile': 'pathtofile', 'browser.safebrowsing.gethashURL': 'http://127.0.0.1/safebrowsing-dummy/gethash', 'extensions.hotfix.url': 'http://127.0.0.1/extensions-dummy/hotfixURL', 'dom.disable_window_move_resize': True, 'network.proxy.http_port': 80, 'browser.dom.window.dump.enabled': True, 'extensions.update.url': 'http://127.0.0.1/extensions-dummy/updateURL', 'browser.chrome.dynamictoolbar': False,  'browser.link.open_newwindow': 2, 'security.turn_off_all_security_so_that_viruses_can_take_over_this_computer': True, 'dom.disable_open_during_load': False, 'extensions.getAddons.search.browseURL': 'http://127.0.0.1/extensions-dummy/repositoryBrowseURL', 'browser.cache.disk.smart_size.enabled': False, 'hangmonitor.timeout': 0, 'dom.send_after_paint_to_content': True, 'security.fileuri.strict_origin_policy': False, 'media.capturestream_hints.enabled': True, 'extensions.update.notifyUser': False, 'extensions.blocklist.enabled': False, 'browser.bookmarks.max_backups': 0, 'browser.shell.checkDefaultBrowser': False, 'media.peerconnection.enabled': True, 'dom.disable_window_flip': True, 'security.enable_java': False, 'browser.warnOnQuit': False, 'media.navigator.enabled': True, 'browser.safebrowsing.updateURL': 'http://127.0.0.1/safebrowsing-dummy/update', 'dom.allow_scripts_to_close_windows': True, 'extensions.webservice.discoverURL': 'http://127.0.0.1/extensions-dummy/discoveryURL'}, 'test_timeout': 1200, 'title': 'qm-pxp01', 'error_filename': 'pathtoerrorfile', 'webserver': 'localhost:15707', 'browser_path':ffox_path, 'port': 20701, 'browser_log': 'browser_output.txt', 'process': 'firefox.exe', 'xperf_path': 'C:/Program Files/Microsoft Windows Performance Toolkit/xperf.exe', 'extensions': ['pathtopageloader'], 'fennecIDs': '', 'init_url': 'http://localhost:15707/getInfo.html', 'browser_wait': 5}
+{'deviceroot': '', 'dirs': {}, 'repository': 'https://hg.mozilla.org/releases/mozilla-release', 'buildid': '20131205075310', 'results_log': 'pathtoresults_log', 'symbols_path': None, 'bcontroller_config': 'pathtobcontroller', 'host': '', 'browser_name': 'Firefox', 'sourcestamp': '39faf812aaec', 'remote': False, 'child_process': 'plugin-container', 'browser_version': '26.0', 'extra_args': '', 'develop': True, 'preferences': {'browser.display.overlaynavbuttons': False, 'extensions.getAddons.get.url': 'http://127.0.0.1/extensions-dummy/repositoryGetURL', 'dom.max_chrome_script_run_time': 0, 'network.proxy.type': 1, 'extensions.update.background.url': 'http://127.0.0.1/extensions-dummy/updateBackgroundURL', 'network.proxy.http': 'localhost', 'plugins.update.url': 'http://127.0.0.1/plugins-dummy/updateCheckURL', 'dom.max_script_run_time': 0, 'extensions.update.enabled': False, 'browser.safebrowsing.keyURL': 'http://127.0.0.1/safebrowsing-dummy/newkey', 'media.navigator.permission.disabled': True, 'app.update.checkInstallTime': False, 'app.update.disabledForTesting': True, 'browser.EULA.override': True, 'extensions.checkCompatibility': False, 'talos.logfile': 'pathtofile', 'browser.safebrowsing.gethashURL': 'http://127.0.0.1/safebrowsing-dummy/gethash', 'extensions.hotfix.url': 'http://127.0.0.1/extensions-dummy/hotfixURL', 'dom.disable_window_move_resize': True, 'network.proxy.http_port': 80, 'browser.dom.window.dump.enabled': True, 'extensions.update.url': 'http://127.0.0.1/extensions-dummy/updateURL', 'browser.chrome.dynamictoolbar': False,  'browser.link.open_newwindow': 2, 'security.turn_off_all_security_so_that_viruses_can_take_over_this_computer': True, 'dom.disable_open_during_load': False, 'extensions.getAddons.search.browseURL': 'http://127.0.0.1/extensions-dummy/repositoryBrowseURL', 'browser.cache.disk.smart_size.enabled': False, 'hangmonitor.timeout': 0, 'dom.send_after_paint_to_content': True, 'security.fileuri.strict_origin_policy': False, 'media.capturestream_hints.enabled': True, 'extensions.update.notifyUser': False, 'extensions.blocklist.enabled': False, 'browser.bookmarks.max_backups': 0, 'browser.shell.checkDefaultBrowser': False, 'media.peerconnection.enabled': True, 'dom.disable_window_flip': True, 'security.enable_java': False, 'browser.warnOnQuit': False, 'media.navigator.enabled': True, 'browser.safebrowsing.updateURL': 'http://127.0.0.1/safebrowsing-dummy/update', 'dom.allow_scripts_to_close_windows': True, 'test_timeout': 1200, 'title': 'qm-pxp01', 'error_filename': 'pathtoerrorfile', 'webserver': 'localhost:15707', 'browser_path':ffox_path, 'port': 20701, 'browser_log': 'browser_output.txt', 'process': 'firefox.exe', 'xperf_path': 'C:/Program Files/Microsoft Windows Performance Toolkit/xperf.exe', 'extensions': ['pathtopageloader'], 'fennecIDs': '', 'init_url': 'http://localhost:15707/getInfo.html', 'browser_wait': 5}
--- a/toolkit/mozapps/extensions/content/aboutaddonsCommon.js
+++ b/toolkit/mozapps/extensions/content/aboutaddonsCommon.js
@@ -36,27 +36,20 @@ ChromeUtils.defineModuleGetter(
 
 XPCOMUtils.defineLazyPreferenceGetter(
   this,
   "XPINSTALL_ENABLED",
   "xpinstall.enabled",
   true
 );
 
-const PREF_DISCOVERURL = "extensions.webservice.discoverURL";
 const PREF_DISCOVER_ENABLED = "extensions.getAddons.showPane";
 const PREF_UI_LASTCATEGORY = "extensions.ui.lastCategory";
 
 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;
--- a/toolkit/mozapps/extensions/test/browser/browser_history_navigation.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_history_navigation.js
@@ -13,17 +13,16 @@
 requestLongerTimeout(4);
 
 const { AddonTestUtils } = ChromeUtils.import(
   "resource://testing-common/AddonTestUtils.jsm"
 );
 
 AddonTestUtils.initMochitest(this);
 
-const MAIN_URL = `https://example.com/${RELATIVE_DIR}discovery.html`;
 const DISCOAPI_URL = `http://example.com/${RELATIVE_DIR}/discovery/api_response_empty.json`;
 
 var gProvider = new MockProvider();
 gProvider.createAddons([
   {
     id: "test1@tests.mozilla.org",
     name: "Test add-on 1",
     description: "foo",
@@ -106,17 +105,17 @@ function is_in_detail(aManager, view, ca
     doc.querySelectorAll("addon-card").length,
     1,
     "Got a detail-view in the HTML about:addons browser"
   );
 
   check_state(canGoBack, canGoForward);
 }
 
-function is_in_discovery(aManager, url, canGoBack, canGoForward) {
+function is_in_discovery(aManager, canGoBack, canGoForward) {
   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"),
@@ -541,27 +540,27 @@ add_task(async function test_open_last_v
 add_task(async function test_discopane_first_history_entry() {
   await SpecialPowers.pushPrefEnv({
     set: [["extensions.getAddons.discovery.api_url", DISCOAPI_URL]],
   });
 
   let aManager = await open_manager("addons://discover/");
   let categoryUtils = new CategoryUtilities(aManager);
   info("1");
-  is_in_discovery(aManager, MAIN_URL, false, false);
+  is_in_discovery(aManager, false, false);
 
   EventUtils.synthesizeMouseAtCenter(categoryUtils.get("plugin"), {}, aManager);
 
   aManager = await wait_for_view_load(aManager);
   is_in_list(aManager, "addons://list/plugin", true, false);
 
   go_back();
   aManager = await wait_for_view_load(aManager);
 
-  is_in_discovery(aManager, MAIN_URL, false, true);
+  is_in_discovery(aManager, false, true);
 
   await close_manager(aManager);
 });
 
 // Tests that navigating the discovery page works when that was the second view
 add_task(async function test_discopane_second_history_entry() {
   let aManager = await open_manager("addons://list/plugin");
   let categoryUtils = new CategoryUtilities(aManager);
@@ -569,27 +568,27 @@ add_task(async function test_discopane_s
 
   EventUtils.synthesizeMouseAtCenter(
     categoryUtils.get("discover"),
     {},
     aManager
   );
 
   aManager = await wait_for_view_load(aManager);
-  is_in_discovery(aManager, MAIN_URL, true, false);
+  is_in_discovery(aManager, true, false);
 
   EventUtils.synthesizeMouseAtCenter(categoryUtils.get("plugin"), {}, aManager);
 
   aManager = await wait_for_view_load(aManager);
   is_in_list(aManager, "addons://list/plugin", true, false);
 
   go_back();
 
   aManager = await wait_for_view_load(aManager);
-  is_in_discovery(aManager, MAIN_URL, true, true);
+  is_in_discovery(aManager, true, true);
 
   go_back();
 
   aManager = await wait_for_view_load(aManager);
   is_in_list(aManager, "addons://list/plugin", false, true);
 
   await close_manager(aManager);
 });
--- a/toolkit/mozapps/extensions/test/browser/head.js
+++ b/toolkit/mozapps/extensions/test/browser/head.js
@@ -23,17 +23,16 @@ pathParts.splice(pathParts.length - 1, p
 
 const RELATIVE_DIR = pathParts.slice(4).join("/") + "/";
 
 const TESTROOT = "http://example.com/" + RELATIVE_DIR;
 const SECURE_TESTROOT = "https://example.com/" + RELATIVE_DIR;
 const TESTROOT2 = "http://example.org/" + RELATIVE_DIR;
 const SECURE_TESTROOT2 = "https://example.org/" + RELATIVE_DIR;
 const CHROMEROOT = pathParts.join("/") + "/";
-const PREF_DISCOVERURL = "extensions.webservice.discoverURL";
 const PREF_DISCOVER_ENABLED = "extensions.getAddons.showPane";
 const PREF_XPI_ENABLED = "xpinstall.enabled";
 const PREF_UPDATEURL = "extensions.update.url";
 const PREF_GETADDONS_CACHE_ENABLED = "extensions.getAddons.cache.enabled";
 const PREF_UI_LASTCATEGORY = "extensions.ui.lastCategory";
 
 const MANAGER_URI = "about:addons";
 const PREF_LOGGING_ENABLED = "extensions.logging.enabled";