Bug 1380680 - Fix test_bug1013412 so it passes with webrender enabled. r?dvander
MozReview-Commit-ID: BaHWdf9qJt1
--- 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();
}