Bug 1544813: Remove extension debug setting. r=jdescottes,flod
authorDaisuke Akatsuka <dakatsuka@mozilla.com>
Thu, 16 May 2019 06:10:52 +0000
changeset 474278 edd9b8f1a0badea3cd7216b6f4db7a44bd77106c
parent 474277 a61d0f7aa588f29a0a30d86fd887b1267bd6f95c
child 474279 5745d2f2bf46a0962ba405ab1d2b705630376d7f
push id113144
push usershindli@mozilla.com
push dateFri, 17 May 2019 16:44:55 +0000
treeherdermozilla-inbound@f4c4b796f845 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes, flod
bugs1544813
milestone68.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 1544813: Remove extension debug setting. r=jdescottes,flod Depends on D31223 Differential Revision: https://phabricator.services.mozilla.com/D31224
devtools/client/aboutdebugging-new/src/actions/runtimes.js
devtools/client/aboutdebugging-new/src/base.css
devtools/client/aboutdebugging-new/src/components/ExtensionDebugSetting.js
devtools/client/aboutdebugging-new/src/components/RuntimeActions.js
devtools/client/aboutdebugging-new/src/components/RuntimePage.js
devtools/client/aboutdebugging-new/src/components/debugtarget/ExtensionAction.js
devtools/client/aboutdebugging-new/src/components/debugtarget/moz.build
devtools/client/aboutdebugging-new/src/components/moz.build
devtools/client/aboutdebugging-new/src/constants.js
devtools/client/aboutdebugging-new/src/modules/debug-target-support.js
devtools/client/aboutdebugging-new/src/reducers/runtimes-state.js
devtools/client/aboutdebugging-new/src/types/runtime.js
devtools/client/aboutdebugging-new/test/browser/browser.ini
devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_addons_debug_setting_thisfirefox.js
devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_addons_debug_setting_usb.js
devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_devtoolstoolbox_tooltip_markupview.js
devtools/client/aboutdebugging-new/test/browser/helper-addons.js
devtools/client/locales/en-US/aboutdebugging.ftl
--- a/devtools/client/aboutdebugging-new/src/actions/runtimes.js
+++ b/devtools/client/aboutdebugging-new/src/actions/runtimes.js
@@ -12,17 +12,16 @@ const {
   getAllRuntimes,
   getCurrentRuntime,
   findRuntimeById,
 } = require("../modules/runtimes-state-helper");
 
 const { l10n } = require("../modules/l10n");
 const { createClientForRuntime } = require("../modules/runtime-client-factory");
 const {
-  isExtensionDebugSettingNeeded,
   isSupportedDebugTargetPane,
 } = require("../modules/debug-target-support");
 
 const { remoteClientManager } =
   require("devtools/client/shared/remote-debugging/remote-client-manager");
 
 const {
   CONNECT_RUNTIME_CANCEL,
@@ -40,19 +39,16 @@ const {
   RUNTIMES,
   THIS_FIREFOX_RUNTIME_CREATED,
   UNWATCH_RUNTIME_FAILURE,
   UNWATCH_RUNTIME_START,
   UNWATCH_RUNTIME_SUCCESS,
   UPDATE_CONNECTION_PROMPT_SETTING_FAILURE,
   UPDATE_CONNECTION_PROMPT_SETTING_START,
   UPDATE_CONNECTION_PROMPT_SETTING_SUCCESS,
-  UPDATE_EXTENSION_DEBUG_SETTING_FAILURE,
-  UPDATE_EXTENSION_DEBUG_SETTING_START,
-  UPDATE_EXTENSION_DEBUG_SETTING_SUCCESS,
   UPDATE_RUNTIME_MULTIE10S_FAILURE,
   UPDATE_RUNTIME_MULTIE10S_START,
   UPDATE_RUNTIME_MULTIE10S_SUCCESS,
   WATCH_RUNTIME_FAILURE,
   WATCH_RUNTIME_START,
   WATCH_RUNTIME_SUCCESS,
 } = require("../constants");
 
@@ -119,29 +115,22 @@ function connectRuntime(id) {
       const runtime = findRuntimeById(id, getState().runtimes);
       const clientWrapper = await createClientForRuntime(runtime);
 
       const deviceDescription = await clientWrapper.getDeviceDescription();
       const compatibilityReport = await clientWrapper.checkVersionCompatibility();
       const icon = await getRuntimeIcon(runtime, deviceDescription.channel);
 
       const {
-        CHROME_DEBUG_ENABLED,
         CONNECTION_PROMPT,
         PERMANENT_PRIVATE_BROWSING,
-        REMOTE_DEBUG_ENABLED,
         SERVICE_WORKERS_ENABLED,
       } = RUNTIME_PREFERENCE;
       const connectionPromptEnabled =
         await clientWrapper.getPreference(CONNECTION_PROMPT, false);
-      const extensionDebugEnabled =
-        isExtensionDebugSettingNeeded(runtime.type)
-          ? await clientWrapper.getPreference(CHROME_DEBUG_ENABLED, true) &&
-            await clientWrapper.getPreference(REMOTE_DEBUG_ENABLED, true)
-          : true;
       const privateBrowsing =
         await clientWrapper.getPreference(PERMANENT_PRIVATE_BROWSING, false);
       const serviceWorkersEnabled =
         await clientWrapper.getPreference(SERVICE_WORKERS_ENABLED, true);
       const serviceWorkersAvailable = serviceWorkersEnabled && !privateBrowsing;
 
       // Fenix specific workarounds are needed until we can get proper server side APIs
       // to detect Fenix and get the proper application names and versions.
@@ -155,17 +144,16 @@ function connectRuntime(id) {
       // retrieved from ADB, and not the Gecko version returned by the Device actor.
       const version = runtime.isFenix ?
         runtime.extra.adbPackageVersion : deviceDescription.version;
 
       const runtimeDetails = {
         clientWrapper,
         compatibilityReport,
         connectionPromptEnabled,
-        extensionDebugEnabled,
         info: {
           deviceName: deviceDescription.deviceName,
           icon,
           name: runtimeName,
           os: deviceDescription.os,
           type: runtime.type,
           version,
         },
@@ -267,42 +255,16 @@ function updateConnectionPromptSetting(c
       dispatch({ type: UPDATE_CONNECTION_PROMPT_SETTING_SUCCESS,
                  runtime, connectionPromptEnabled });
     } catch (e) {
       dispatch({ type: UPDATE_CONNECTION_PROMPT_SETTING_FAILURE, error: e });
     }
   };
 }
 
-function updateExtensionDebugSetting(extensionDebugEnabled) {
-  return async (dispatch, getState) => {
-    dispatch({ type: UPDATE_EXTENSION_DEBUG_SETTING_START });
-    try {
-      const runtime = getCurrentRuntime(getState().runtimes);
-      const { clientWrapper } = runtime.runtimeDetails;
-
-      const { CHROME_DEBUG_ENABLED, REMOTE_DEBUG_ENABLED } = RUNTIME_PREFERENCE;
-      await clientWrapper.setPreference(CHROME_DEBUG_ENABLED, extensionDebugEnabled);
-      await clientWrapper.setPreference(REMOTE_DEBUG_ENABLED, extensionDebugEnabled);
-
-      // Re-get actual value from the runtime.
-      const isChromeDebugEnabled =
-        await clientWrapper.getPreference(CHROME_DEBUG_ENABLED, extensionDebugEnabled);
-      const isRemoveDebugEnabled =
-        await clientWrapper.getPreference(REMOTE_DEBUG_ENABLED, extensionDebugEnabled);
-      extensionDebugEnabled = isChromeDebugEnabled && isRemoveDebugEnabled;
-
-      dispatch({ type: UPDATE_EXTENSION_DEBUG_SETTING_SUCCESS,
-                 runtime, extensionDebugEnabled });
-    } catch (e) {
-      dispatch({ type: UPDATE_EXTENSION_DEBUG_SETTING_FAILURE, error: e });
-    }
-  };
-}
-
 function updateMultiE10s() {
   return async (dispatch, getState) => {
     dispatch({ type: UPDATE_RUNTIME_MULTIE10S_START });
     try {
       const runtime = getCurrentRuntime(getState().runtimes);
       const { clientWrapper } = runtime.runtimeDetails;
       // Re-get actual value from the runtime.
       const { isMultiE10s } = await clientWrapper.getDeviceDescription();
@@ -515,13 +477,12 @@ function removeRuntimeListeners() {
 
 module.exports = {
   connectRuntime,
   createThisFirefoxRuntime,
   disconnectRuntime,
   removeRuntimeListeners,
   unwatchRuntime,
   updateConnectionPromptSetting,
-  updateExtensionDebugSetting,
   updateNetworkRuntimes,
   updateUSBRuntimes,
   watchRuntime,
 };
--- a/devtools/client/aboutdebugging-new/src/base.css
+++ b/devtools/client/aboutdebugging-new/src/base.css
@@ -154,21 +154,16 @@ p, h1 {
   white-space: nowrap;
 }
 
 /* Technical text that should use a monospace font, such as code, error messages. */
 .technical-text {
   font-family: var(--monospace-font-family);
 }
 
-/* Text that is not selectable */
-.unselectable-text {
-  -moz-user-select: none;
-}
-
 /* Links that need to look like current text */
 .undecorated-link,
 .undecorated-link:hover {
   text-decoration: none;
   color: currentColor;
 }
 
 /* Text needs to wrap anywhere */
@@ -372,23 +367,16 @@ Form controls
   height: 100%;
 
   border: 1px solid var(--box-border-color);
   border-radius: 2px;
   color: var(--text-color);
   background-color: var(--box-background);
 }
 
-/* Standard checkbox, from Photon */
-.default-checkbox {
-  height: calc(var(--base-unit) * 4);
-  margin-inline-end: var(--base-unit);
-  width: calc(var(--base-unit) * 4);
-}
-
 /*
 * Other UI components
 */
 
 /*
 * A small, colored badge.
 * NOTE: styles borrowed from Photon's micro buttons (there aren't badges)
 */
deleted file mode 100644
--- a/devtools/client/aboutdebugging-new/src/components/ExtensionDebugSetting.js
+++ /dev/null
@@ -1,77 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-const { createFactory, PureComponent } = require("devtools/client/shared/vendor/react");
-const dom = require("devtools/client/shared/vendor/react-dom-factories");
-const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
-
-const FluentReact = require("devtools/client/shared/vendor/fluent-react");
-const Localized = createFactory(FluentReact.Localized);
-
-const Actions = require("../actions/index");
-
-const DOC_URL =
-  "https://developer.mozilla.org/docs/Tools/about:debugging#Enabling_add-on_debugging";
-
-class ExtensionDebugSetting extends PureComponent {
-  static get propTypes() {
-    return {
-      className: PropTypes.string,
-      dispatch: PropTypes.func.isRequired,
-      extensionDebugEnabled: PropTypes.bool.isRequired,
-    };
-  }
-
-  onToggle() {
-    const { extensionDebugEnabled, dispatch } = this.props;
-    dispatch(Actions.updateExtensionDebugSetting(!extensionDebugEnabled));
-  }
-
-  renderCheckbox() {
-    const { extensionDebugEnabled } = this.props;
-
-    return dom.input(
-      {
-        type: "checkbox",
-        id: "extension-debug-setting-input",
-        className: "default-checkbox  qa-extension-debug-checkbox",
-        checked: extensionDebugEnabled,
-        onChange: () => this.onToggle(),
-      }
-    );
-  }
-
-  renderLabel() {
-    return Localized(
-      {
-        id: "about-debugging-extension-debug-setting-label",
-        a: dom.a({
-          href: DOC_URL,
-          target: "_blank",
-        }),
-      },
-      dom.label(
-        {
-          className: "unselectable-text",
-          htmlFor: "extension-debug-setting-input",
-        },
-        "Enable extension debugging [Learn more]"
-      )
-    );
-  }
-
-  render() {
-    const { className } = this.props;
-
-    return dom.aside(
-      { className },
-      this.renderCheckbox(),
-      this.renderLabel(),
-    );
-  }
-}
-
-module.exports = ExtensionDebugSetting;
--- a/devtools/client/aboutdebugging-new/src/components/RuntimeActions.js
+++ b/devtools/client/aboutdebugging-new/src/components/RuntimeActions.js
@@ -7,24 +7,21 @@
 const { createFactory, PureComponent } = require("devtools/client/shared/vendor/react");
 const dom = require("devtools/client/shared/vendor/react-dom-factories");
 const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
 
 const FluentReact = require("devtools/client/shared/vendor/fluent-react");
 const Localized = createFactory(FluentReact.Localized);
 
 const ConnectionPromptSetting = createFactory(require("./ConnectionPromptSetting"));
-const ExtensionDebugSetting = createFactory(require("./ExtensionDebugSetting"));
 
 const Actions = require("../actions/index");
 const { RUNTIMES } = require("../constants");
 const Types = require("../types/index");
 
-const { isExtensionDebugSettingNeeded } = require("../modules/debug-target-support");
-
 class RuntimeActions extends PureComponent {
   static get propTypes() {
     return {
       dispatch: PropTypes.func.isRequired,
       runtimeDetails: Types.runtimeDetails,
       runtimeId: PropTypes.string.isRequired,
     };
   }
@@ -40,27 +37,16 @@ class RuntimeActions extends PureCompone
     return runtimeId !== RUNTIMES.THIS_FIREFOX
              ? ConnectionPromptSetting({
                  connectionPromptEnabled,
                  dispatch,
              })
              : null;
   }
 
-  renderExtensionDebugSetting() {
-    const { dispatch, runtimeDetails } = this.props;
-    const { extensionDebugEnabled, info } = runtimeDetails;
-    return isExtensionDebugSettingNeeded(info.type)
-             ? ExtensionDebugSetting({
-                 dispatch,
-                 extensionDebugEnabled,
-             })
-             : null;
-  }
-
   renderProfileButton() {
     const { runtimeId } = this.props;
 
     return runtimeId !== RUNTIMES.THIS_FIREFOX
          ? Localized(
            {
              id: "about-debugging-runtime-profile-button2",
            },
@@ -72,22 +58,18 @@ class RuntimeActions extends PureCompone
              "about-debugging-runtime-profile-button2"
            ),
          )
          : null;
   }
 
   render() {
     return dom.div(
-      {},
-      dom.div(
-        {
-          className: "runtime-actions__toolbar",
-        },
-        this.renderProfileButton(),
-        this.renderConnectionPromptSetting(),
-      ),
-      this.renderExtensionDebugSetting(),
+      {
+        className: "runtime-actions__toolbar",
+      },
+      this.renderProfileButton(),
+      this.renderConnectionPromptSetting(),
     );
   }
 }
 
 module.exports = RuntimeActions;
--- a/devtools/client/aboutdebugging-new/src/components/RuntimePage.js
+++ b/devtools/client/aboutdebugging-new/src/components/RuntimePage.js
@@ -9,17 +9,16 @@ const { createFactory, PureComponent } =
 const dom = require("devtools/client/shared/vendor/react-dom-factories");
 const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
 
 const FluentReact = require("devtools/client/shared/vendor/fluent-react");
 const Localized = createFactory(FluentReact.Localized);
 
 const CompatibilityWarning = createFactory(require("./CompatibilityWarning"));
 const DebugTargetPane = createFactory(require("./debugtarget/DebugTargetPane"));
-const ExtensionAction = createFactory(require("./debugtarget/ExtensionAction"));
 const ExtensionDetail = createFactory(require("./debugtarget/ExtensionDetail"));
 const InspectAction = createFactory(require("./debugtarget/InspectAction"));
 const ProfilerDialog = createFactory(require("./ProfilerDialog"));
 const RuntimeActions = createFactory(require("./RuntimeActions"));
 const RuntimeInfo = createFactory(require("./RuntimeInfo"));
 const ServiceWorkerAction = createFactory(require("./debugtarget/ServiceWorkerAction"));
 const ServiceWorkerAdditionalActions =
   createFactory(require("./debugtarget/ServiceWorkerAdditionalActions"));
@@ -161,26 +160,26 @@ class RuntimePage extends PureComponent 
                                  null,
                                  TabDetail,
                                  DEBUG_TARGET_PANE.TAB,
                                  "about-debugging-runtime-tabs"),
       this.renderDebugTargetPane("Temporary Extensions",
                                  this.getIconByType(DEBUG_TARGETS.EXTENSION),
                                  temporaryExtensions,
                                  this.renderTemporaryExtensionInstallSection(),
-                                 ExtensionAction,
+                                 InspectAction,
                                  TemporaryExtensionAdditionalActions,
                                  TemporaryExtensionDetail,
                                  DEBUG_TARGET_PANE.TEMPORARY_EXTENSION,
                                  "about-debugging-runtime-temporary-extensions"),
       this.renderDebugTargetPane("Extensions",
                                  this.getIconByType(DEBUG_TARGETS.EXTENSION),
                                  installedExtensions,
                                  null,
-                                 ExtensionAction,
+                                 InspectAction,
                                  null,
                                  ExtensionDetail,
                                  DEBUG_TARGET_PANE.INSTALLED_EXTENSION,
                                  "about-debugging-runtime-extensions"),
       this.renderDebugTargetPane("Service Workers",
                                  this.getIconByType(DEBUG_TARGETS.WORKER),
                                  serviceWorkers,
                                  null,
deleted file mode 100644
--- a/devtools/client/aboutdebugging-new/src/components/debugtarget/ExtensionAction.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-const { connect } = require("devtools/client/shared/vendor/react-redux");
-const { createFactory, PureComponent } = require("devtools/client/shared/vendor/react");
-const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
-
-const InspectAction = createFactory(require("./InspectAction"));
-
-const Types = require("../../types/index");
-
-const { getCurrentRuntimeDetails } = require("../../modules/runtimes-state-helper");
-
-/**
- * This component provides components that inspect extension.
- */
-class ExtensionAction extends PureComponent {
-  static get propTypes() {
-    return {
-      dispatch: PropTypes.func.isRequired,
-      runtimeDetails: Types.runtimeDetails.isRequired,
-      target: Types.debugTarget.isRequired,
-    };
-  }
-
-  render() {
-    const { dispatch, runtimeDetails, target } = this.props;
-    const { extensionDebugEnabled } = runtimeDetails;
-    return InspectAction({
-      disabled: !extensionDebugEnabled,
-      dispatch,
-      target,
-    });
-  }
-}
-
-const mapStateToProps = state => {
-  return {
-    runtimeDetails: getCurrentRuntimeDetails(state.runtimes),
-  };
-};
-module.exports = connect(mapStateToProps)(ExtensionAction);
--- a/devtools/client/aboutdebugging-new/src/components/debugtarget/moz.build
+++ b/devtools/client/aboutdebugging-new/src/components/debugtarget/moz.build
@@ -4,17 +4,16 @@
 
 DevToolsModules(
     'DebugTargetItem.css',
     'DebugTargetItem.js',
     'DebugTargetList.css',
     'DebugTargetList.js',
     'DebugTargetPane.css',
     'DebugTargetPane.js',
-    'ExtensionAction.js',
     'ExtensionDetail.js',
     'FieldPair.css',
     'FieldPair.js',
     'InspectAction.js',
     'ProcessDetail.js',
     'ServiceWorkerAction.css',
     'ServiceWorkerAction.js',
     'ServiceWorkerAdditionalActions.js',
--- a/devtools/client/aboutdebugging-new/src/components/moz.build
+++ b/devtools/client/aboutdebugging-new/src/components/moz.build
@@ -9,17 +9,16 @@ DIRS += [
     'sidebar',
 ]
 
 DevToolsModules(
     'App.css',
     'App.js',
     'CompatibilityWarning.js',
     'ConnectionPromptSetting.js',
-    'ExtensionDebugSetting.js',
     'ProfilerDialog.css',
     'ProfilerDialog.js',
     'RuntimeActions.css',
     'RuntimeActions.js',
     'RuntimeInfo.css',
     'RuntimeInfo.js',
     'RuntimePage.js',
     'ServiceWorkersWarning.js',
--- a/devtools/client/aboutdebugging-new/src/constants.js
+++ b/devtools/client/aboutdebugging-new/src/constants.js
@@ -56,19 +56,16 @@ const actionTypes = {
   TEMPORARY_EXTENSION_RELOAD_SUCCESS: "TEMPORARY_EXTENSION_RELOAD_SUCCESS",
   THIS_FIREFOX_RUNTIME_CREATED: "THIS_FIREFOX_RUNTIME_CREATED",
   UNWATCH_RUNTIME_FAILURE: "UNWATCH_RUNTIME_FAILURE",
   UNWATCH_RUNTIME_START: "UNWATCH_RUNTIME_START",
   UNWATCH_RUNTIME_SUCCESS: "UNWATCH_RUNTIME_SUCCESS",
   UPDATE_CONNECTION_PROMPT_SETTING_FAILURE: "UPDATE_CONNECTION_PROMPT_SETTING_FAILURE",
   UPDATE_CONNECTION_PROMPT_SETTING_START: "UPDATE_CONNECTION_PROMPT_SETTING_START",
   UPDATE_CONNECTION_PROMPT_SETTING_SUCCESS: "UPDATE_CONNECTION_PROMPT_SETTING_SUCCESS",
-  UPDATE_EXTENSION_DEBUG_SETTING_FAILURE: "UPDATE_EXTENSION_DEBUG_SETTING_FAILURE",
-  UPDATE_EXTENSION_DEBUG_SETTING_START: "UPDATE_EXTENSION_DEBUG_SETTING_START",
-  UPDATE_EXTENSION_DEBUG_SETTING_SUCCESS: "UPDATE_EXTENSION_DEBUG_SETTING_SUCCESS",
   UPDATE_RUNTIME_MULTIE10S_FAILURE: "UPDATE_RUNTIME_MULTIE10S_FAILURE",
   UPDATE_RUNTIME_MULTIE10S_START: "UPDATE_RUNTIME_MULTIE10S_START",
   UPDATE_RUNTIME_MULTIE10S_SUCCESS: "UPDATE_RUNTIME_MULTIE10S_SUCCESS",
   USB_RUNTIMES_SCAN_START: "USB_RUNTIMES_SCAN_START",
   USB_RUNTIMES_SCAN_SUCCESS: "USB_RUNTIMES_SCAN_SUCCESS",
   WATCH_RUNTIME_FAILURE: "WATCH_RUNTIME_FAILURE",
   WATCH_RUNTIME_START: "WATCH_RUNTIME_START",
   WATCH_RUNTIME_SUCCESS: "WATCH_RUNTIME_SUCCESS",
@@ -111,20 +108,18 @@ const PREFERENCES = {
   SHOW_HIDDEN_ADDONS: "devtools.aboutdebugging.showHiddenAddons",
   // Preference to store the last path used for loading a temporary extension.
   TEMPORARY_EXTENSION_PATH: "devtools.aboutdebugging.tmpExtDirPath",
   // Preference that disables installing extensions when set to false.
   XPINSTALL_ENABLED: "xpinstall.enabled",
 };
 
 const RUNTIME_PREFERENCE = {
-  CHROME_DEBUG_ENABLED: "devtools.chrome.enabled",
   CONNECTION_PROMPT: "devtools.debugger.prompt-connection",
   PERMANENT_PRIVATE_BROWSING: "browser.privatebrowsing.autostart",
-  REMOTE_DEBUG_ENABLED: "devtools.debugger.remote-enabled",
   SERVICE_WORKERS_ENABLED: "dom.serviceWorkers.enabled",
 };
 
 const RUNTIMES = {
   NETWORK: CONNECTION_TYPES.NETWORK,
   THIS_FIREFOX: CONNECTION_TYPES.THIS_FIREFOX,
   USB: CONNECTION_TYPES.USB,
 };
--- a/devtools/client/aboutdebugging-new/src/modules/debug-target-support.js
+++ b/devtools/client/aboutdebugging-new/src/modules/debug-target-support.js
@@ -50,28 +50,15 @@ const THIS_FIREFOX_DEBUG_TARGET_PANES = 
 
 const SUPPORTED_TARGET_PANE_BY_RUNTIME = {
   [RUNTIMES.THIS_FIREFOX]: THIS_FIREFOX_DEBUG_TARGET_PANES,
   [RUNTIMES.USB]: REMOTE_DEBUG_TARGET_PANES,
   [RUNTIMES.NETWORK]: REMOTE_DEBUG_TARGET_PANES,
 };
 
 /**
- * If extension debug setting is needed for given runtime type, return true.
- *
- * @param {String} runtimeType
- * @return {bool} true: needed
- */
-function isExtensionDebugSettingNeeded(runtimeType) {
-  // Debugging local addons for This Firefox reuses the Browser Toolbox, which requires
-  // some preferences to be enabled.
-  return runtimeType === RUNTIMES.THIS_FIREFOX;
-}
-exports.isExtensionDebugSettingNeeded = isExtensionDebugSettingNeeded;
-
-/**
  * A debug target pane is more specialized than a debug target. For instance EXTENSION is
  * a DEBUG_TARGET but INSTALLED_EXTENSION and TEMPORARY_EXTENSION are DEBUG_TARGET_PANES.
  */
 function isSupportedDebugTargetPane(runtimeType, debugTargetPaneKey) {
   return SUPPORTED_TARGET_PANE_BY_RUNTIME[runtimeType].includes(debugTargetPaneKey);
 }
 exports.isSupportedDebugTargetPane = isSupportedDebugTargetPane;
--- a/devtools/client/aboutdebugging-new/src/reducers/runtimes-state.js
+++ b/devtools/client/aboutdebugging-new/src/reducers/runtimes-state.js
@@ -8,17 +8,16 @@ const {
   CONNECT_RUNTIME_CANCEL,
   CONNECT_RUNTIME_FAILURE,
   CONNECT_RUNTIME_NOT_RESPONDING,
   CONNECT_RUNTIME_START,
   CONNECT_RUNTIME_SUCCESS,
   DISCONNECT_RUNTIME_SUCCESS,
   RUNTIMES,
   UPDATE_CONNECTION_PROMPT_SETTING_SUCCESS,
-  UPDATE_EXTENSION_DEBUG_SETTING_SUCCESS,
   UPDATE_RUNTIME_MULTIE10S_SUCCESS,
   REMOTE_RUNTIMES_UPDATED,
   SELECTED_RUNTIME_ID_UPDATED,
   THIS_FIREFOX_RUNTIME_CREATED,
 } = require("../constants");
 
 const {
   findRuntimeById,
@@ -147,25 +146,16 @@ function runtimesReducer(state = Runtime
       const { connectionPromptEnabled } = action;
       const { id: runtimeId } = action.runtime;
       const runtime = findRuntimeById(runtimeId, state);
       const runtimeDetails =
         Object.assign({}, runtime.runtimeDetails, { connectionPromptEnabled });
       return _updateRuntimeById(runtimeId, { runtimeDetails }, state);
     }
 
-    case UPDATE_EXTENSION_DEBUG_SETTING_SUCCESS: {
-      const { extensionDebugEnabled } = action;
-      const { id: runtimeId } = action.runtime;
-      const runtime = findRuntimeById(runtimeId, state);
-      const runtimeDetails =
-        Object.assign({}, runtime.runtimeDetails, { extensionDebugEnabled });
-      return _updateRuntimeById(runtimeId, { runtimeDetails }, state);
-    }
-
     case UPDATE_RUNTIME_MULTIE10S_SUCCESS: {
       const { isMultiE10s } = action;
       const { id: runtimeId } = action.runtime;
       const runtime = findRuntimeById(runtimeId, state);
       const runtimeDetails =
         Object.assign({}, runtime.runtimeDetails, { isMultiE10s });
       return _updateRuntimeById(runtimeId, { runtimeDetails }, state);
     }
--- a/devtools/client/aboutdebugging-new/src/types/runtime.js
+++ b/devtools/client/aboutdebugging-new/src/types/runtime.js
@@ -56,20 +56,16 @@ const runtimeDetails = {
 
   // compatibility report to check if the target runtime is in range of the backward
   // compatibility policy for DevTools remote debugging.
   compatibilityReport: PropTypes.shape(compatibilityReport).isRequired,
 
   // reflect devtools.debugger.prompt-connection preference of this runtime
   connectionPromptEnabled: PropTypes.bool.isRequired,
 
-  // In case that runtime is this-firefox, reflects devtools.chrome.enabled and
-  // devtools.debugger.remote-enabled preference. Otherwise, this sould be true.
-  extensionDebugEnabled: PropTypes.bool.isRequired,
-
   // runtime information
   info: PropTypes.shape(runtimeInfo).isRequired,
 
   // True if this runtime supports multiple content processes
   // This might be undefined when connecting to runtimes older than Fx 66
   isMultiE10s: PropTypes.bool,
 
   // True if service workers should be available in the target runtime. Service workers
--- a/devtools/client/aboutdebugging-new/test/browser/browser.ini
+++ b/devtools/client/aboutdebugging-new/test/browser/browser.ini
@@ -29,18 +29,16 @@ support-files =
 tags = webextensions
 [browser_aboutdebugging_addons_debug_inspector.js]
 tags = webextensions
 [browser_aboutdebugging_addons_debug_nobg.js]
 tags = webextensions
 [browser_aboutdebugging_addons_debug_popup.js]
 skip-if = (verify && debug) || (debug && os == "linux" && bits == 64) # verify: crashes on shutdown, timeouts linux debug Bug 1299001
 tags = webextensions
-[browser_aboutdebugging_addons_debug_setting_thisfirefox.js]
-[browser_aboutdebugging_addons_debug_setting_usb.js]
 [browser_aboutdebugging_addons_manifest_url.js]
 skip-if = (os == 'linux' && bits == 32) # ADB start() fails on linux 32, see Bug 1499638
 [browser_aboutdebugging_addons_remote_runtime.js]
 [browser_aboutdebugging_addons_temporary_addon_buttons.js]
 skip-if = (os == 'win') # On windows the AddonManager locks the XPI file loaded as a temporary extension and we can not test the reload of the extension.
 [browser_aboutdebugging_addons_temporary_id_message.js]
 [browser_aboutdebugging_addons_temporary_install_error.js]
 [browser_aboutdebugging_addons_temporary_install_path.js]
deleted file mode 100644
--- a/devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_addons_debug_setting_thisfirefox.js
+++ /dev/null
@@ -1,110 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-/* import-globals-from helper-addons.js */
-Services.scriptloader.loadSubScript(CHROME_URL_ROOT + "helper-addons.js", this);
-/* import-globals-from helper-collapsibilities.js */
-Services.scriptloader.loadSubScript(CHROME_URL_ROOT + "helper-collapsibilities.js", this);
-
-const TEMPORARY_EXTENSION_ID = "test-devtools-webextension@mozilla.org";
-const TEMPORARY_EXTENSION_NAME = "test-devtools-webextension";
-const REGULAR_EXTENSION_ID = "packaged-extension@tests";
-const REGULAR_EXTENSION_NAME = "Packaged extension";
-
-const TEST_DATA = [
-  {
-    chromeEnabled: false,
-    debuggerRemoteEnable: false,
-    isEnabledAtInitial: false,
-  }, {
-    chromeEnabled: false,
-    debuggerRemoteEnable: true,
-    isEnabledAtInitial: false,
-  }, {
-    chromeEnabled: true,
-    debuggerRemoteEnable: false,
-    isEnabledAtInitial: false,
-  }, {
-    chromeEnabled: true,
-    debuggerRemoteEnable: true,
-    isEnabledAtInitial: true,
-  },
-];
-
-/**
- * Check the state of extension debug setting checkbox, inspect buttons and prefs on
- * this-firefox at initializing and after toggling.
- */
-add_task(async function() {
-  info("Force all debug target panes to be expanded");
-  prepareCollapsibilitiesTest();
-
-  for (const testData of TEST_DATA) {
-    await testState(testData);
-  }
-});
-
-async function testState({ chromeEnabled, debuggerRemoteEnable, isEnabledAtInitial }) {
-  info(`Test for chromeEnabled: ${ chromeEnabled }, ` +
-       `debuggerRemoteEnable:${ debuggerRemoteEnable }`);
-
-  info("Set initial state for test");
-  await pushPref("devtools.chrome.enabled", chromeEnabled);
-  await pushPref("devtools.debugger.remote-enabled", debuggerRemoteEnable);
-
-  const { document, tab, window } = await openAboutDebugging();
-  await selectThisFirefoxPage(document, window.AboutDebugging.store);
-  await installExtensions(document);
-
-  info("Check the status of extension debug setting checkbox and inspect buttons");
-  const checkbox = document.querySelector(".qa-extension-debug-checkbox");
-  ok(checkbox, "Extension debug setting checkbox exists");
-  is(checkbox.checked, isEnabledAtInitial, "The state of checkbox is correct");
-  assertInspectButtons(isEnabledAtInitial, document);
-
-  info("Check the status after toggling checkbox");
-  checkbox.click();
-  await waitUntil(() => checkbox.checked !== isEnabledAtInitial);
-  ok(true, "The state of checkbox is changed correctly after toggling");
-  assertPreferences(!isEnabledAtInitial);
-  assertInspectButtons(!isEnabledAtInitial, document);
-
-  await uninstallExtensions(document);
-  await removeTab(tab);
-}
-
-function assertPreferences(expected) {
-  for (const pref of ["devtools.chrome.enabled", "devtools.debugger.remote-enabled"]) {
-    is(Services.prefs.getBoolPref(pref), expected, `${ pref } should be ${expected}`);
-  }
-}
-
-function assertInspectButtons(shouldBeEnabled, document) {
-  assertInspectButtonsOnCategory(shouldBeEnabled, "Temporary Extensions", document);
-  assertInspectButtonsOnCategory(shouldBeEnabled, "Extensions", document);
-  // Inspect button on Tabs category should be always enabled.
-  assertInspectButtonsOnCategory(true, "Tabs", document);
-}
-
-function assertInspectButtonsOnCategory(shouldBeEnabled, category, document) {
-  const pane = getDebugTargetPane(category, document);
-  const buttons = pane.querySelectorAll(".qa-debug-target-inspect-button");
-  ok([...buttons].every(b => b.disabled !== shouldBeEnabled),
-     `disabled attribute should be ${ !shouldBeEnabled } on ${ category }`);
-}
-
-async function installExtensions(document) {
-  await installTemporaryExtensionFromXPI({
-    id: TEMPORARY_EXTENSION_ID,
-    name: TEMPORARY_EXTENSION_NAME,
-  }, document);
-
-  await installRegularExtension("resources/packaged-extension/packaged-extension.xpi");
-}
-
-async function uninstallExtensions(document) {
-  await removeTemporaryExtension(TEMPORARY_EXTENSION_NAME, document);
-  await removeExtension(REGULAR_EXTENSION_ID, REGULAR_EXTENSION_NAME, document);
-}
deleted file mode 100644
--- a/devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_addons_debug_setting_usb.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-/* import-globals-from helper-collapsibilities.js */
-Services.scriptloader.loadSubScript(CHROME_URL_ROOT + "helper-collapsibilities.js", this);
-
-/**
- * Check extension debug setting on USB runtime.
- */
-add_task(async function() {
-  info("Force all debug target panes to be expanded");
-  prepareCollapsibilitiesTest();
-
-  info("Set initial state for test");
-  await pushPref("devtools.debugger.remote-enabled", false);
-
-  // Setup USB devices mocks
-  const mocks = new Mocks();
-  const usbRuntime = mocks.createUSBRuntime("1337id", {
-    deviceName: "Fancy Phone",
-    name: "Lorem ipsum",
-  });
-  const extension = { name: "Test extension name", debuggable: true };
-  usbRuntime.listAddons = () => [extension];
-
-  const { document, tab, window } = await openAboutDebugging();
-  await selectThisFirefoxPage(document, window.AboutDebugging.store);
-  mocks.emitUSBUpdate();
-
-  info("Check the status of extension debug setting checkbox and inspect buttons");
-  await connectToRuntime("Fancy Phone", document);
-  await selectRuntime("Fancy Phone", "Lorem ipsum", document);
-  ok(!document.querySelector(".qa-extension-debug-checkbox"),
-     "Extension debug setting checkbox should not exist");
-  const buttons = document.querySelectorAll(".qa-debug-target-inspect-button");
-  ok([...buttons].every(b => !b.disabled), "All inspect buttons should be enabled");
-
-  await removeTab(tab);
-});
--- a/devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_devtoolstoolbox_tooltip_markupview.js
+++ b/devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_devtoolstoolbox_tooltip_markupview.js
@@ -8,16 +8,19 @@ Services.scriptloader.loadSubScript(CHRO
 
 /**
  * Test tooltip of markup view on about:devtools-toolbox page.
  */
 add_task(async function() {
   info("Force all debug target panes to be expanded");
   prepareCollapsibilitiesTest();
 
+  info("Turn on devtools.chrome.enabled to show event badges");
+  await pushPref("devtools.chrome.enabled", true);
+
   const { document, tab, window } = await openAboutDebugging();
   await selectThisFirefoxPage(document, window.AboutDebugging.store);
   const { devtoolsDocument, devtoolsTab, devtoolsWindow } =
     await openAboutDevtoolsToolbox(document, tab, window);
 
   info("Select inspector tool");
   const toolbox = getToolbox(devtoolsWindow);
   await toolbox.selectTool("inspector");
--- a/devtools/client/aboutdebugging-new/test/browser/helper-addons.js
+++ b/devtools/client/aboutdebugging-new/test/browser/helper-addons.js
@@ -9,19 +9,16 @@ function _getSupportsFile(path) {
   const cr = Cc["@mozilla.org/chrome/chrome-registry;1"]
     .getService(Ci.nsIChromeRegistry);
   const uri = Services.io.newURI(CHROME_URL_ROOT + path);
   const fileurl = cr.convertChromeURL(uri);
   return fileurl.QueryInterface(Ci.nsIFileURL);
 }
 
 async function enableExtensionDebugging() {
-  // Force enabling of addons debugging
-  await pushPref("devtools.chrome.enabled", true);
-  await pushPref("devtools.debugger.remote-enabled", true);
   // Disable security prompt
   await pushPref("devtools.debugger.prompt-connection", false);
   // Enable Browser toolbox test script execution via env variable
   await pushPref("devtools.browser-toolbox.allow-unsafe-script", true);
 }
 /* exported enableExtensionDebugging */
 
 /**
--- a/devtools/client/locales/en-US/aboutdebugging.ftl
+++ b/devtools/client/locales/en-US/aboutdebugging.ftl
@@ -251,22 +251,16 @@ about-debugging-connection-prompt-enable
 
 # Text of the connection prompt button displayed in Runtime pages, when the preference
 # "devtools.debugger.prompt-connection" is true on the target runtime.
 about-debugging-connection-prompt-disable-button = Disable connection prompt
 
 # Title of a modal dialog displayed on remote runtime pages after clicking on the Profile Runtime button.
 about-debugging-profiler-dialog-title2 = Profiler
 
-# Label of a checkbox displayed in the runtime page for "This Firefox".
-# This checkbox will toggle preferences that enable local addon debugging.
-# The "Learn more" link points to MDN.
-# https://developer.mozilla.org/docs/Tools/about:debugging#Enabling_add-on_debugging
-about-debugging-extension-debug-setting-label = Enable extension debugging. <a>Learn more</a>
-
 # Clicking on the header of a debug target category will expand or collapse the debug
 # target items in the category. This text is used as ’title’ attribute of the header,
 # to describe this feature.
 about-debugging-collapse-expand-debug-targets = Collapse / expand
 
 # Debug Targets strings
 
 # Displayed in the categories of "runtime" pages that don't have any debug target to