Bug 1505747 - Reset flex overlay colors before testing them; r=gl
authorPatrick Brosset <pbrosset@mozilla.com>
Mon, 03 Dec 2018 19:28:10 +0000
changeset 508487 7d3b17b7130955d9afbc9c10a188bb6fd39a2370
parent 508486 a002d2b3408bf9ac543f723c50818e8bfdb27fea
child 508488 0f02ec66af19136b49ecbcb4a21596b8330b1f1c
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgl
bugs1505747
milestone65.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 1505747 - Reset flex overlay colors before testing them; r=gl Differential Revision: https://phabricator.services.mozilla.com/D13680
devtools/client/inspector/flexbox/test/browser_flexbox_highlighter_color_picker_on_ESC.js
devtools/client/inspector/flexbox/test/browser_flexbox_highlighter_color_picker_on_RETURN.js
--- a/devtools/client/inspector/flexbox/test/browser_flexbox_highlighter_color_picker_on_ESC.js
+++ b/devtools/client/inspector/flexbox/test/browser_flexbox_highlighter_color_picker_on_ESC.js
@@ -1,19 +1,24 @@
 /* Any copyright is dedicated to the Public Domain.
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
+const asyncStorage = require("devtools/shared/async-storage");
+
 // Test that the flexbox highlighter color change in the color picker is reverted when
 // ESCAPE is pressed.
 
 const TEST_URI = URL_ROOT + "doc_flexbox_specific_cases.html";
 
 add_task(async function() {
+  // Make sure there are no custom highlighter colors stored before starting.
+  await asyncStorage.removeItem("flexboxInspectorHostColors");
+
   await addTab(TEST_URI);
   const { inspector, flexboxInspector, layoutView } = await openLayoutView();
   const { document: doc } = flexboxInspector;
   const { store } = inspector;
   const cPicker = layoutView.swatchColorPickerTooltip;
   const spectrum = cPicker.spectrum;
 
   const onColorSwatchRendered = waitForDOM(doc,
--- a/devtools/client/inspector/flexbox/test/browser_flexbox_highlighter_color_picker_on_RETURN.js
+++ b/devtools/client/inspector/flexbox/test/browser_flexbox_highlighter_color_picker_on_RETURN.js
@@ -1,19 +1,24 @@
 /* Any copyright is dedicated to the Public Domain.
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
+const asyncStorage = require("devtools/shared/async-storage");
+
 // Test that the flexbox highlighter color change in the color picker is committed when
 // RETURN is pressed.
 
 const TEST_URI = URL_ROOT + "doc_flexbox_specific_cases.html";
 
 add_task(async function() {
+  // Make sure there are no custom highlighter colors stored before starting.
+  await asyncStorage.removeItem("flexboxInspectorHostColors");
+
   await addTab(TEST_URI);
   const { inspector, flexboxInspector, layoutView } = await openLayoutView();
   const { document: doc } = flexboxInspector;
   const { highlighters, store } = inspector;
   const cPicker = layoutView.swatchColorPickerTooltip;
   const spectrum = cPicker.spectrum;
 
   const onColorSwatchRendered = waitForDOM(doc,