Backed out changeset 97a383ec65b7 (bug 1591501) for failures at browser_discovery.js on a CLOSED TREE.
authorGurzau Raul <rgurzau@mozilla.com>
Wed, 13 Nov 2019 21:39:22 +0200
changeset 501767 f7c199feb6c60812b4e41ea944f4c13a6b2b80a7
parent 501766 6387f7830d6646e39f8d1102d9d436985c2546c2
child 501768 a4ef4d6cdff03e76ed4471faea08e1071b1bf05c
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1591501
milestone72.0a1
backs out97a383ec65b7791c289a1ae523cd7181d3ec6093
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 changeset 97a383ec65b7 (bug 1591501) for failures at browser_discovery.js on a CLOSED TREE.
toolkit/mozapps/extensions/content/extensions.js
toolkit/mozapps/extensions/test/browser/browser.ini
toolkit/mozapps/extensions/test/browser/browser_sidebar_categories.js
toolkit/mozapps/extensions/test/browser/head.js
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -827,18 +827,23 @@ var gCategories = {
       this.node.value = gViewDefault;
     }
 
     this.node.addEventListener("select", () => {
       gViewController.loadView(this.node.selectedItem.value);
     });
 
     this.node.addEventListener("click", aEvent => {
-      let viewId = this.node.selectedItem.value;
-      if (gViewController.currentViewId !== viewId) {
+      var selectedItem = this.node.selectedItem;
+      if (
+        aEvent.target.localName == "richlistitem" &&
+        aEvent.target == selectedItem
+      ) {
+        var viewId = selectedItem.value;
+
         gViewController.loadView(viewId);
       }
     });
   },
 
   shutdown() {
     AddonManager.removeTypeListener(this);
   },
--- a/toolkit/mozapps/extensions/test/browser/browser.ini
+++ b/toolkit/mozapps/extensions/test/browser/browser.ini
@@ -94,17 +94,16 @@ skip-if = verify
 [browser_manage_shortcuts_hidden.js]
 [browser_page_options_install_addon.js]
 [browser_page_options_updates.js]
 [browser_panel_item_accesskey.js]
 [browser_pluginprefs.js]
 [browser_reinstall.js]
 [browser_search_bar_focus.js]
 [browser_shortcuts_duplicate_check.js]
-[browser_sidebar_categories.js]
 [browser_task_next_test.js]
 [browser_updateid.js]
 [browser_updatessl.js]
 [browser_webapi.js]
 [browser_webapi_abuse_report.js]
 support-files =
   head_abuse_report.js
 [browser_webapi_access.js]
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/browser/browser_sidebar_categories.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-const THEME_ID = "default-theme@mozilla.org";
-
-add_task(async function testClickingSidebarEntriesChangesView() {
-  let win = await loadInitialView("extension");
-  let doc = win.document;
-  let { managerWindow } = win;
-  let themeCategory = managerWindow.document.getElementById("category-theme");
-
-  let assertViewHas = (selector, msg) => ok(doc.querySelector(selector), msg);
-  let assertListView = type =>
-    assertViewHas(`addon-list[type="${type}"]`, `On ${type} list`);
-
-  assertListView("extension");
-
-  let loaded = waitForViewLoad(win);
-  themeCategory.click();
-  await loaded;
-
-  assertListView("theme");
-
-  loaded = waitForViewLoad(win);
-  getAddonCard(win, THEME_ID).click();
-  await loaded;
-
-  ok(!doc.querySelector("addon-list"), "No more addon-list");
-  assertViewHas(
-    `addon-card[addon-id="${THEME_ID}"][expanded]`,
-    "Detail view now"
-  );
-
-  loaded = waitForViewLoad(win);
-  themeCategory.firstElementChild.click();
-  await loaded;
-
-  assertListView("theme");
-
-  await closeView(win);
-});
--- a/toolkit/mozapps/extensions/test/browser/head.js
+++ b/toolkit/mozapps/extensions/test/browser/head.js
@@ -325,22 +325,18 @@ function check_all_in_list(aManager, aId
   for (let inlistItem of inlist) {
     if (!aIds.includes(inlistItem)) {
       ok(false, "Shouldn't have seen " + inlistItem + " in the list");
     }
   }
 }
 
 function get_addon_element(aManager, aId) {
-  const win = aManager.getHtmlBrowser().contentWindow;
-  return getAddonCard(win, aId);
-}
-
-function getAddonCard(win, id) {
-  return win.document.querySelector(`addon-card[addon-id="${id}"]`);
+  const doc = aManager.getHtmlBrowser().contentDocument;
+  return doc.querySelector(`addon-card[addon-id="${aId}"]`);
 }
 
 function wait_for_view_load(
   aManagerWindow,
   aCallback,
   aForceWait,
   aLongerTimeout
 ) {