Bug 1361080 - filter out hidden devtools menu items in customizableui test;r=jaws
authorJulian Descottes <jdescottes@mozilla.com>
Wed, 11 Oct 2017 17:04:22 +0200
changeset 385945 a5a45ed8b40031f20f7bc4b8a08b7d68bfb2461b
parent 385944 63a2497c280c599c20d618374d7dcd7af0e2f638
child 385946 c1f9baaa7b63ce9fde52044adf8bef2d9e42cb86
push id32672
push userarchaeopteryx@coole-files.de
push dateFri, 13 Oct 2017 09:00:05 +0000
treeherdermozilla-central@3efcb26e5f37 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1361080
milestone58.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 1361080 - filter out hidden devtools menu items in customizableui test;r=jaws DevTools are adding a hidden menuitem "Enable DevTools..." that will be used to propose an onboarding screen to users. This hidden button makes a customizable ui test fail. It needs to be filtered out. MozReview-Commit-ID: IX4SlpDHdsT
browser/components/customizableui/test/browser_989751_subviewbutton_class.js
--- a/browser/components/customizableui/test/browser_989751_subviewbutton_class.js
+++ b/browser/components/customizableui/test/browser_989751_subviewbutton_class.js
@@ -3,17 +3,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const kCustomClass = "acustomclassnoonewilluse";
 var tempElement = null;
 
 function insertClassNameToMenuChildren(parentMenu) {
-  let el = parentMenu.querySelector("menuitem:first-of-type");
+  // Skip hidden menuitem elements, not copied via fillSubviewFromMenuItems.
+  let el = parentMenu.querySelector("menuitem:not([hidden])");
   el.classList.add(kCustomClass);
   tempElement = el;
 }
 
 function checkSubviewButtonClass(menuId, buttonId, subviewId) {
   return async function() {
     // Initialize DevTools before starting the test in order to create menuitems in
     // menuWebDeveloperPopup.