Bug 1380680 - Fix test_bug1013412 so it passes with webrender enabled. r?dvander draft
authorKartikaya Gupta <kgupta@mozilla.com>
Thu, 13 Jul 2017 11:15:59 -0400
changeset 608418 81db102e9db3187233f1c46e69bc0460bf14d70c
parent 607967 30ea2905130e85f9e1d8d56fa3097901eec6514b
child 637287 b3dccf7f27dc091aacbe0db24e28cf4929e65807
push id68258
push userkgupta@mozilla.com
push dateThu, 13 Jul 2017 15:16:43 +0000
reviewersdvander
bugs1380680, 1013412
milestone56.0a1
Bug 1380680 - Fix test_bug1013412 so it passes with webrender enabled. r?dvander MozReview-Commit-ID: BaHWdf9qJt1
dom/events/test/test_bug1013412.html
--- a/dom/events/test/test_bug1013412.html
+++ b/dom/events/test/test_bug1013412.html
@@ -1,16 +1,17 @@
 <!DOCTYPE HTML>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=1013412
 -->
 <head>
   <title>Test for Bug 1013412</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <script type="text/javascript" src="/tests/SimpleTest/paint_listener.js"></script>
   <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <style>
   #content {
     height: 800px;
     overflow: scroll;
   }
 
@@ -76,20 +77,20 @@ document.getElementById("scrollbox").add
   e.preventDefault();
 });
 
 var iteration = 0;
 function runTest() {
   var content = document.getElementById('content');
   if (iteration < 300) { // enough iterations that we would scroll to the bottom of 'content'
     iteration++;
-    synthesizeWheel(content, 100, 10,
-                    { deltaMode: WheelEvent.DOM_DELTA_LINE,
-                      deltaY: 1.0, lineOrPageDeltaY: 1 });
-    setTimeout(runTest, 0);
+    sendWheelAndPaint(content, 100, 10,
+                     { deltaMode: WheelEvent.DOM_DELTA_LINE,
+                       deltaY: 1.0, lineOrPageDeltaY: 1 },
+                     runTest);
     return;
   }
   var scrollbox = document.getElementById('scrollbox');
   is(content.scrollTop < content.scrollTopMax, true, "We should not have scrolled to the bottom of the scrollframe");
   is(rotationAdjusted, true, "The rotation should have been adjusted");
   SimpleTest.finish();
 }