Backed out changeset cfb51d413370 (bug 1509459) for devtools failures on browser_flexbox_highlighter_color_picker_on_ESC.js.
authorBrindusan Cristian <cbrindusan@mozilla.com>
Wed, 28 Nov 2018 19:23:08 +0200
changeset 505045 037b1d961ac53610890b6cb3dcc6ac81ad7ce008
parent 505044 d43ea215cceebe13bf68fde77dc75fc91c94d1dc
child 505046 930054aa138bd32f51bbe2ec84e07267859afa6e
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1509459
milestone65.0a1
backs outcfb51d413370736adc5200b42598564d7ac2d59b
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 cfb51d413370 (bug 1509459) for devtools failures on browser_flexbox_highlighter_color_picker_on_ESC.js.
devtools/client/inspector/flexbox/flexbox.js
devtools/client/inspector/flexbox/test/browser.ini
devtools/client/inspector/flexbox/test/browser_flexbox_highlighter_state_on_sidebar_select.js
devtools/client/inspector/flexbox/test/head.js
devtools/client/inspector/inspector.js
--- a/devtools/client/inspector/flexbox/flexbox.js
+++ b/devtools/client/inspector/flexbox/flexbox.js
@@ -475,17 +475,17 @@ class FlexboxInspector {
         return;
       }
 
       if (!flexItemContainer && flexContainer.nodeFront === this.selection.nodeFront) {
         flexItemContainer = await this.getFlexContainerProps(this.selection.nodeFront,
           true);
       }
 
-      const highlighted = this.inspector.isHighlighterReady &&
+      const highlighted = this._highlighters &&
         flexContainer.nodeFront === this.highlighters.flexboxHighlighterShown;
       const color = await this.getOverlayColor();
 
       this.store.dispatch(updateFlexbox({
         color,
         flexContainer,
         flexItemContainer,
         highlighted,
--- a/devtools/client/inspector/flexbox/test/browser.ini
+++ b/devtools/client/inspector/flexbox/test/browser.ini
@@ -21,17 +21,16 @@ support-files =
 [browser_flexbox_accordion_state.js]
 [browser_flexbox_container_and_item.js]
 [browser_flexbox_container_and_item_updates_on_change.js]
 [browser_flexbox_container_element_rep.js]
 [browser_flexbox_container_properties.js]
 [browser_flexbox_empty_state.js]
 [browser_flexbox_highlighter_color_picker_on_ESC.js]
 [browser_flexbox_highlighter_color_picker_on_RETURN.js]
-[browser_flexbox_highlighter_state_on_sidebar_select.js]
 [browser_flexbox_item_list_01.js]
 [browser_flexbox_item_list_02.js]
 [browser_flexbox_item_list_updates_on_change.js]
 [browser_flexbox_item_outline_exists.js]
 [browser_flexbox_item_outline_has_correct_layout.js]
 [browser_flexbox_item_outline_hidden_when_useless.js]
 [browser_flexbox_item_outline_renders_basisfinal_points_correctly.js]
 [browser_flexbox_item_outline_rotates_for_column.js]
deleted file mode 100644
--- a/devtools/client/inspector/flexbox/test/browser_flexbox_highlighter_state_on_sidebar_select.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-// Test the flexbox inspector highlighter state when the layout panel is selected after
-// toggling on the flexbox highlighter from the rules view.
-
-const TEST_URI = URL_ROOT + "doc_flexbox_specific_cases.html";
-
-add_task(async function() {
-  await pushPref("devtools.inspector.activeSidebar", "computedview");
-  await addTab(TEST_URI);
-  const { inspector, view } = await openRuleView();
-  const { styleDocument: doc } = view;
-  const { highlighters } = inspector;
-
-  await selectNode("#container", inspector);
-
-  const container = getRuleViewProperty(view, ".container", "display").valueSpan;
-  const flexboxToggle = container.querySelector(".ruleview-flex");
-
-  info("Toggling ON the flexbox highlighter from the rule-view.");
-  const onHighlighterShown = highlighters.once("flexbox-highlighter-shown");
-  flexboxToggle.click();
-  await onHighlighterShown;
-
-  info("Selecting the layout panel");
-  const onFlexHighlighterToggleRendered = waitForDOM(doc, "#flexbox-checkbox-toggle");
-  inspector.sidebar.select("layoutview");
-  const [flexHighlighterToggle] = await onFlexHighlighterToggleRendered;
-
-  info("Checking the state of the Flexbox Inspector.");
-  ok(flexHighlighterToggle, "The flexbox highlighter toggle is rendered.");
-  ok(flexHighlighterToggle.checked, "The flexbox highlighter toggle is checked.");
-  ok(highlighters.flexboxHighlighterShown, "Flexbox highlighter is shown.");
-});
--- a/devtools/client/inspector/flexbox/test/head.js
+++ b/devtools/client/inspector/flexbox/test/head.js
@@ -1,17 +1,18 @@
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* Any copyright is dedicated to the Public Domain.
  http://creativecommons.org/publicdomain/zero/1.0/ */
 /* eslint no-unused-vars: [2, {"vars": "local"}] */
-/* import-globals-from ../../shared/test/head.js */
+/* import-globals-from ../../test/head.js */
 "use strict";
 
+// Import the inspector's head.js first (which itself imports shared-head.js).
 Services.scriptloader.loadSubScript(
-  "chrome://mochitests/content/browser/devtools/client/inspector/shared/test/head.js",
+  "chrome://mochitests/content/browser/devtools/client/inspector/test/head.js",
   this);
 
 // Load the shared Redux helpers into this compartment.
 Services.scriptloader.loadSubScript(
   "chrome://mochitests/content/browser/devtools/client/shared/test/shared-redux-head.js",
   this);
 
 // Make sure the flexbox inspector is enabled before running the tests.
--- a/devtools/client/inspector/inspector.js
+++ b/devtools/client/inspector/inspector.js
@@ -193,20 +193,16 @@ Inspector.prototype = {
   get highlighters() {
     if (!this._highlighters) {
       this._highlighters = new HighlightersOverlay(this);
     }
 
     return this._highlighters;
   },
 
-  get isHighlighterReady() {
-    return !!this._highlighters;
-  },
-
   get is3PaneModeEnabled() {
     if (this.target.chrome) {
       if (!this._is3PaneModeChromeEnabled) {
         this._is3PaneModeChromeEnabled = Services.prefs.getBoolPref(
           THREE_PANE_CHROME_ENABLED_PREF);
       }
 
       return this._is3PaneModeChromeEnabled;