Bug 1492374 - Move all ADB related preferences out of webide;r=ladybenko
authorJulian Descottes <jdescottes@mozilla.com>
Mon, 01 Oct 2018 11:40:23 +0000
changeset 494755 df4088486e03f86dfb135f66f5938971e3700e9e
parent 494754 c6ae59fd5fff3aff99383bd8caa2c84c7145008f
child 494756 e68feba6bf0178a01e5098f7a88b0a5bcc007473
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersladybenko
bugs1492374
milestone64.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 1492374 - Move all ADB related preferences out of webide;r=ladybenko While this is not strictly related for uninstalling ADB helper this small cleanup avoids duplicating the declaration of the adb extension in two different preferences. The URL preference also moves to a devtools-shared preference as there is not much sense to keep it webide only. Differential Revision: https://phabricator.services.mozilla.com/D7057
devtools/client/webide/modules/addons.js
devtools/client/webide/preferences/webide.js
devtools/client/webide/test/head.js
devtools/shared/preferences/devtools-shared.js
--- a/devtools/client/webide/modules/addons.js
+++ b/devtools/client/webide/modules/addons.js
@@ -4,18 +4,18 @@
 
 "use strict";
 
 const {AddonManager} = require("resource://gre/modules/AddonManager.jsm");
 const {Devices} = require("resource://devtools/shared/apps/Devices.jsm");
 const Services = require("Services");
 const EventEmitter = require("devtools/shared/event-emitter");
 
-var ADB_LINK = Services.prefs.getCharPref("devtools.webide.adbExtensionURL");
-var ADB_ADDON_ID = Services.prefs.getCharPref("devtools.webide.adbExtensionID");
+var ADB_LINK = Services.prefs.getCharPref("devtools.remote.adb.extensionURL");
+var ADB_ADDON_ID = Services.prefs.getCharPref("devtools.remote.adb.extensionID");
 
 var platform = Services.appShell.hiddenDOMWindow.navigator.platform;
 var OS = "";
 if (platform.includes("Win")) {
   OS = "win32";
 } else if (platform.includes("Mac")) {
   OS = "mac64";
 } else if (platform.includes("Linux")) {
--- a/devtools/client/webide/preferences/webide.js
+++ b/devtools/client/webide/preferences/webide.js
@@ -2,14 +2,12 @@
    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/. */
 
 pref("devtools.webide.templatesURL", "https://code.cdn.mozilla.net/templates/list.json");
 pref("devtools.webide.autoinstallADBExtension", true);
 pref("devtools.webide.autoConnectRuntime", true);
 pref("devtools.webide.restoreLastProject", true);
 pref("devtools.webide.enableLocalRuntime", false);
-pref("devtools.webide.adbExtensionURL", "https://ftp.mozilla.org/pub/mozilla.org/labs/devtools/adb-extension/#OS#/adb-extension-latest-#OS#.xpi");
-pref("devtools.webide.adbExtensionID", "adb@mozilla.org");
 pref("devtools.webide.lastConnectedRuntime", "");
 pref("devtools.webide.lastSelectedProject", "");
 pref("devtools.webide.zoom", "1");
 pref("devtools.webide.busyTimeout", 10000);
--- a/devtools/client/webide/test/head.js
+++ b/devtools/client/webide/test/head.js
@@ -17,17 +17,17 @@ if (window.location === AppConstants.BRO
   TEST_BASE = "chrome://mochitests/content/browser/devtools/client/webide/test/";
 } else {
   TEST_BASE = "chrome://mochitests/content/chrome/devtools/client/webide/test/";
 }
 
 Services.prefs.setBoolPref("devtools.webide.enabled", true);
 Services.prefs.setBoolPref("devtools.webide.enableLocalRuntime", true);
 
-Services.prefs.setCharPref("devtools.webide.adbExtensionURL", TEST_BASE + "addons/adb-extension-#OS#.xpi");
+Services.prefs.setCharPref("devtools.remote.adb.extensionURL", TEST_BASE + "addons/adb-extension-#OS#.xpi");
 Services.prefs.setCharPref("devtools.webide.templatesURL", TEST_BASE + "templates.json");
 Services.prefs.setCharPref("devtools.devices.url", TEST_BASE + "browser_devices.json");
 
 var registerCleanupFunction = registerCleanupFunction ||
                               SimpleTest.registerCleanupFunction;
 registerCleanupFunction(() => {
   Services.prefs.clearUserPref("devtools.webide.enabled");
   Services.prefs.clearUserPref("devtools.webide.enableLocalRuntime");
--- a/devtools/shared/preferences/devtools-shared.js
+++ b/devtools/shared/preferences/devtools-shared.js
@@ -56,11 +56,13 @@ pref("devtools.dump.emit", false);
 pref("devtools.discovery.log", false);
 // Whether to scan for DevTools devices via WiFi
 pref("devtools.remote.wifi.scan", true);
 // Client must complete TLS handshake within this window (ms)
 pref("devtools.remote.tls-handshake-timeout", 10000);
 
 // The extension ID for devtools-adb-extension
 pref("devtools.remote.adb.extensionID", "adb@mozilla.org");
+// The URL for for devtools-adb-extension (overridden in tests to a local path)
+pref("devtools.remote.adb.extensionURL", "https://ftp.mozilla.org/pub/mozilla.org/labs/devtools/adb-extension/#OS#/adb-extension-latest-#OS#.xpi");
 
 // URL of the remote JSON catalog used for device simulation
 pref("devtools.devices.url", "https://code.cdn.mozilla.net/devices/devices.json");