Bug 1497521 - Force the new flexbox inspector ON before running its tests; r=jdescottes
authorPatrick Brosset <pbrosset@mozilla.com>
Fri, 12 Oct 2018 05:04:39 +0000
changeset 496537 a37d277dfb6c70f6633366d3c6ba34ddd7aeb827
parent 496536 3c25a0b6d2699e6a335ada101fbb3b2d12ad553f
child 496538 8bd12e6c3f9979d00afb2fc699bb292a03962f0a
child 496571 3115ef0a285ec3a44c73fc0c60cb2cab11abd836
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes
bugs1497521
milestone64.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 1497521 - Force the new flexbox inspector ON before running its tests; r=jdescottes Differential Revision: https://phabricator.services.mozilla.com/D8089
devtools/client/inspector/flexbox/test/head.js
--- a/devtools/client/inspector/flexbox/test/head.js
+++ b/devtools/client/inspector/flexbox/test/head.js
@@ -5,17 +5,23 @@
 /* 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/test/head.js",
   this);
 
+// Make sure the flexbox inspector is enabled before running the tests.
+Services.prefs.setBoolPref("devtools.flexboxinspector.enabled", true);
+
 // Make sure only the flexbox layout accordion is opened, and the others are closed.
 Services.prefs.setBoolPref("devtools.layout.flexbox.opened", true);
 Services.prefs.setBoolPref("devtools.layout.boxmodel.opened", false);
 Services.prefs.setBoolPref("devtools.layout.grid.opened", false);
+
+// Clear all set prefs.
 registerCleanupFunction(() => {
+  Services.prefs.clearUserPref("devtools.flexboxinspector.enabled");
   Services.prefs.clearUserPref("devtools.layout.flexbox.opened");
   Services.prefs.clearUserPref("devtools.layout.boxmodel.opened");
   Services.prefs.clearUserPref("devtools.layout.grid.opened");
 });