Bug 1530823 - Use pushPref to temporarily enable highlighting boxmodel properties in tests. r=gl
authorMicah Tigley <mtigley@mozilla.com>
Thu, 28 Feb 2019 18:12:28 +0000
changeset 519670 458fef0de61d8423533fbe452c2980d9f0861064
parent 519669 a27b5825884bd750be974a963caa7ccb74d781e4
child 519671 1a272d807e843449f87c661ec31c0a3000a74d8f
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgl
bugs1530823
milestone67.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 1530823 - Use pushPref to temporarily enable highlighting boxmodel properties in tests. r=gl Differential Revision: https://phabricator.services.mozilla.com/D21573
devtools/client/inspector/boxmodel/test/browser_boxmodel_jump-to-rule-on-hover.js
devtools/client/inspector/boxmodel/test/browser_boxmodel_show-tooltip-for-unassociated-rule.js
--- a/devtools/client/inspector/boxmodel/test/browser_boxmodel_jump-to-rule-on-hover.js
+++ b/devtools/client/inspector/boxmodel/test/browser_boxmodel_jump-to-rule-on-hover.js
@@ -11,16 +11,17 @@ const TEST_URI =
   `<style>
     #box {
       margin: 5px;
     }
   </style>
   <div id="box"></div>`;
 
 add_task(async function() {
+  await pushPref("devtools.layout.boxmodel.highlightProperty", true);
   await addTab("data:text/html," + encodeURIComponent(TEST_URI));
   const { inspector, boxmodel } = await openLayoutView();
   await selectNode("#box", inspector);
 
   info("Test that hovering over margin-top value highlights the property in rules view.");
   const ruleView = await inspector.getPanel("ruleview").view;
   const el = boxmodel.document.querySelector(".boxmodel-margin.boxmodel-top > span");
 
--- a/devtools/client/inspector/boxmodel/test/browser_boxmodel_show-tooltip-for-unassociated-rule.js
+++ b/devtools/client/inspector/boxmodel/test/browser_boxmodel_show-tooltip-for-unassociated-rule.js
@@ -11,16 +11,17 @@ const L10N = new LocalizationHelper("dev
 
 const TEST_URI =
   `<style>
     #box {}
   </style>
   <div id="box"></div>`;
 
 add_task(async function() {
+  await pushPref("devtools.layout.boxmodel.highlightProperty", true);
   await addTab("data:text/html," + encodeURIComponent(TEST_URI));
   const { inspector, boxmodel } = await openLayoutView();
   const { rulePreviewTooltip } = boxmodel;
   await selectNode("#box", inspector);
 
   info("Test that hovering over margin-top shows tooltip showing 'No associated rule'.");
   const el = boxmodel.document.querySelector(".boxmodel-margin.boxmodel-top > span");