Bug 1435373 Part 5: Update browser_inspector_highlighter-cssshape_04.js to wait on reflow after mouse moves, before waiting on shape changes. draft
authorBrad Werth <bwerth@mozilla.com>
Fri, 23 Mar 2018 15:55:13 -0700
changeset 771881 a9d66da0c406ceeb04d3e6c591dafb26354f4732
parent 771877 bcf592f276fad2a78cd31456a1cb7ffbff94c28c
push id103800
push userbwerth@mozilla.com
push dateFri, 23 Mar 2018 22:55:54 +0000
bugs1435373
milestone61.0a1
Bug 1435373 Part 5: Update browser_inspector_highlighter-cssshape_04.js to wait on reflow after mouse moves, before waiting on shape changes. MozReview-Commit-ID: CLURwjndRiV
devtools/client/inspector/test/browser_inspector_highlighter-cssshape_04.js
--- a/devtools/client/inspector/test/browser_inspector_highlighter-cssshape_04.js
+++ b/devtools/client/inspector/test/browser_inspector_highlighter-cssshape_04.js
@@ -196,16 +196,17 @@ function* testCircleMoveCenter(config) {
   let dy = height / 10;
 
   let onShapeChangeApplied = highlighters.once("shapes-highlighter-changes-applied");
   info("Moving circle center");
   let { mouse } = helper;
   yield mouse.down(cxPixel, cyPixel, selector);
   yield mouse.move(cxPixel + dx, cyPixel + dy, selector);
   yield mouse.up(cxPixel + dx, cyPixel + dy, selector);
+  yield testActor.reflow()
   yield onShapeChangeApplied;
 
   let definition = yield getComputedPropertyValue(selector, property, inspector);
   ok(definition.includes(`at ${cx + 10}% ${cy + 10}%`),
      "Circle center successfully moved");
 
   yield teardown({selector, property, ...config});
 }
@@ -306,16 +307,17 @@ function* testInsetMoveEdges(config) {
   yield mouse.up(left + dx, yCenter, selector);
   yield testActor.reflow();
 
   info("Moving inset right");
   let onShapeChangeApplied = highlighters.once("shapes-highlighter-changes-applied");
   yield mouse.down(right, yCenter, selector);
   yield mouse.move(right + dx, yCenter, selector);
   yield mouse.up(right + dx, yCenter, selector);
+  yield testActor.reflow();
   yield onShapeChangeApplied;
 
   let definition = yield getComputedPropertyValue(selector, property, inspector);
   ok(definition.includes(
     `${top + dy}px ${elemWidth - right - dx}px ${100 - y - height - 10}% ${x + 10}%`),
      "Inset edges successfully moved");
 
   yield teardown({selector, property, ...config});