Bug 1365761 - Modify the mochitest for bug 1328065 to avoid relying on receiving a mouse event while the mouse is over the scrollbar. r=kats draft
authorBotond Ballo <botond@mozilla.com>
Mon, 05 Jun 2017 18:43:49 -0400
changeset 590321 fedaf1464966691c117ee76c5a2d1c4a60742c41
parent 589150 cad53f061da634a16ea75887558301b77f65745d
child 590322 30bd643922409f47eb2318938a07e7543337d625
push id62701
push userbballo@mozilla.com
push dateWed, 07 Jun 2017 16:30:43 +0000
reviewerskats
bugs1365761, 1328065
milestone55.0a1
Bug 1365761 - Modify the mochitest for bug 1328065 to avoid relying on receiving a mouse event while the mouse is over the scrollbar. r=kats MozReview-Commit-ID: 5jGiY0n9Hdc
gfx/layers/apz/test/mochitest/helper_scroll_over_scrollbar.html
--- a/gfx/layers/apz/test/mochitest/helper_scroll_over_scrollbar.html
+++ b/gfx/layers/apz/test/mochitest/helper_scroll_over_scrollbar.html
@@ -7,17 +7,18 @@
   <script type="application/javascript">
 
 function* test(testDriver) {
   var subframe = document.getElementById('scroll');
 
   // scroll over the scrollbar, and make sure the subframe scrolls
   var scrollPos = subframe.scrollTop;
   var scrollbarX = (200 + subframe.clientWidth) / 2;
-  yield moveMouseAndScrollWheelOver(subframe, scrollbarX, 100, testDriver);
+  yield synthesizeNativeWheelAndWaitForScrollEvent(subframe, scrollbarX, 100,
+      0, -10, testDriver);
   ok(subframe.scrollTop > scrollPos, "subframe scrolled after wheeling over scrollbar");
 }
 
 waitUntilApzStable()
 .then(runContinuation(test))
 .then(subtestDone);
 
   </script>