Backed out 2 changesets (bug 1477137) for devtools failures at devtools/client/aboutdebugging/test/browser_addons_toggle_debug.js
authorCoroiu Cristina <ccoroiu@mozilla.com>
Fri, 27 Jul 2018 16:45:06 +0300
changeset 428722 6ddec20d1e35b91e52af72b963f92320c111536c
parent 428721 452156f0fc6d79738b09f2763a1908ef80dab09c
child 428723 91307a0650ac547c13aed381477178132255ad5a
push id34340
push userdvarga@mozilla.com
push dateFri, 27 Jul 2018 17:37:02 +0000
treeherdermozilla-central@d353b80fd66c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1477137
milestone63.0a1
backs outc75f46c67e2733766dc9f2a3b6ac7979b6ef65f7
dd5e331122a911f9bb88e50205de4e2e841073cd
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
Backed out 2 changesets (bug 1477137) for devtools failures at devtools/client/aboutdebugging/test/browser_addons_toggle_debug.js Backed out changeset c75f46c67e27 (bug 1477137) Backed out changeset dd5e331122a9 (bug 1477137)
devtools/client/aboutdebugging/components/addons/Panel.js
devtools/client/aboutdebugging/test/browser.ini
devtools/client/aboutdebugging/test/browser_addons_remove_temporary_and_undo.js
devtools/client/aboutdebugging/test/head.js
--- a/devtools/client/aboutdebugging/components/addons/Panel.js
+++ b/devtools/client/aboutdebugging/components/addons/Panel.js
@@ -49,18 +49,16 @@ class AddonsPanel extends Component {
 
     this.updateDebugStatus = this.updateDebugStatus.bind(this);
     this.updateShowSystemStatus = this.updateShowSystemStatus.bind(this);
     this.updateAddonsList = this.updateAddonsList.bind(this);
     this.onInstalled = this.onInstalled.bind(this);
     this.onUninstalled = this.onUninstalled.bind(this);
     this.onEnabled = this.onEnabled.bind(this);
     this.onDisabled = this.onDisabled.bind(this);
-    this.onUninstalling = this.onUninstalling.bind(this);
-    this.onOperationCancelled = this.onOperationCancelled.bind(this);
   }
 
   componentDidMount() {
     AddonManager.addAddonListener(this);
     // Listen to startup since that's when errors and warnings
     // get populated on the extension.
     Management.on("startup", this.updateAddonsList);
 
@@ -149,30 +147,16 @@ class AddonsPanel extends Component {
 
   /**
    * Mandatory callback as AddonManager listener.
    */
   onDisabled() {
     this.updateAddonsList();
   }
 
-  /**
-   * Mandatory callback as AddonManager listener.
-   */
-  onUninstalling() {
-    this.updateAddonsList();
-  }
-
-  /**
-   * Mandatory callback as AddonManager listener.
-   */
-  onOperationCancelled() {
-    this.updateAddonsList();
-  }
-
   render() {
     const { client, connect, id } = this.props;
     const { debugDisabled, extensions: targets, showSystemAddons } = this.state;
     const installedName = Strings.GetStringFromName("extensions");
     const temporaryName = Strings.GetStringFromName("temporaryExtensions");
     const systemName = Strings.GetStringFromName("systemExtensions");
     const targetClass = AddonTarget;
 
--- a/devtools/client/aboutdebugging/test/browser.ini
+++ b/devtools/client/aboutdebugging/test/browser.ini
@@ -34,17 +34,16 @@ tags = webextensions
 [browser_addons_debug_webextension_popup.js]
 skip-if = coverage || (verify && debug) || (debug && os == "linux" && bits == 64) # coverage: Bug 1387827, verify: crashes on shutdown, timeouts linux debug Bug 1299001
 tags = webextensions
 [browser_addons_debugging_initial_state.js]
 [browser_addons_install.js]
 skip-if = verify && debug
 [browser_addons_reload.js]
 [browser_addons_remove.js]
-[browser_addons_remove_temporary_and_undo.js]
 [browser_addons_toggle_debug.js]
 [browser_page_not_found.js]
 [browser_service_workers.js]
 [browser_service_workers_fetch_flag.js]
 skip-if = os == 'mac' # bug 1333759
 [browser_service_workers_multi_content_process.js]
 skip-if = !e10s # This test is only valid in e10s
 [browser_service_workers_not_compatible.js]
deleted file mode 100644
--- a/devtools/client/aboutdebugging/test/browser_addons_remove_temporary_and_undo.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-"use strict";
-
-// Test for temporary removing and undoing an extension.
-
-add_task(async () => {
-  const addonID = "test-devtools-webextension@mozilla.org";
-  const addonName = "test-devtools-webextension";
-
-  const { document, tab } = await openAboutDebugging("addons");
-  await waitForInitialAddonList(document);
-
-  // Install this add-on, and verify that it appears in the about:debugging UI
-  await installAddon({
-    document,
-    path: "addons/test-devtools-webextension/manifest.json",
-    name: addonName,
-    isWebExtension: true,
-  });
-  ok(getTargetEl(document, addonID), "Add-on is shown");
-
-  info("Uninstall the addon but allow to undo the action " +
-       "(same as when uninstalling from about:addons)");
-  await uninstallAddon({ document, id: addonID, name: addonName, allowUndo: true });
-  await waitUntil(() => !getTargetEl(document, addonID), 100);
-  ok(true, "Add-on is hidden after removal");
-
-  info("Canceling uninstalling to undo");
-  await cancelUninstallAddon({ document, id: addonID, name: addonName });
-  await waitUntil(() => getTargetEl(document, addonID), 100);
-  ok(true, "Add-on re-appeared after undo");
-
-  await uninstallAddon({ document, id: addonID, name: addonName });
-  await closeAboutDebugging(tab);
-});
-
-function getTargetEl(document, id) {
-  return document.querySelector(`[data-addon-id="${id}"]`);
-}
--- a/devtools/client/aboutdebugging/test/head.js
+++ b/devtools/client/aboutdebugging/test/head.js
@@ -200,60 +200,38 @@ async function installAddon({document, p
 
   await onAddonInstalled;
   ok(true, "Addon installed and running its bootstrap.js file");
 
   info("Wait for the addon to appear in the UI");
   await waitUntilAddonContainer(name, document);
 }
 
-async function uninstallAddon({document, id, name, allowUndo}) {
+async function uninstallAddon({document, id, name}) {
   // Now uninstall this addon
   await new Promise(async done => {
     const addon = await AddonManager.getAddonByID(id);
-    const eventName = allowUndo ? "onUninstalling" : "onUninstalled";
     const listener = {
-      [eventName]: function(uninstalledAddon) {
+      onUninstalled: function(uninstalledAddon) {
         if (uninstalledAddon != addon) {
           return;
         }
+        AddonManager.removeAddonListener(listener);
 
-        AddonManager.removeAddonListener(listener);
         done();
-      },
+      }
     };
     AddonManager.addAddonListener(listener);
-    addon.uninstall(allowUndo);
+    addon.uninstall();
   });
 
   info("Wait until the addon is removed from about:debugging");
   await waitUntil(() => !getAddonContainer(name, document), 100);
 }
 
-async function cancelUninstallAddon({document, id, name}) {
-  await new Promise(async done => {
-    const addon = await AddonManager.getAddonByID(id);
-    const listener = {
-      onOperationCancelled: function(cancelledAddon) {
-        if (cancelledAddon != addon) {
-          return;
-        }
-
-        AddonManager.removeAddonListener(listener);
-        done();
-      },
-    };
-    AddonManager.addAddonListener(listener);
-    addon.cancelUninstall();
-  });
-
-  info("Wait for the addon to appear in the UI");
-  await waitUntil(() => getAddonContainer(name, document), 100);
-}
-
 function getAddonCount(document) {
   const addonListContainer = getAddonList(document);
   const addonElements = addonListContainer.querySelectorAll(".target");
   return addonElements.length;
 }
 
 /**
  * Returns a promise that will resolve when the add-on list has been updated.