Index: third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-div.html |
diff --git a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-div.html b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-div.html |
index c98c221ebae8f1a7111abcd68bb19ad0a6d88fa2..ad147334de36a3db001e77f666025e77dc4ec567 100644 |
--- a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-div.html |
+++ b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-div.html |
@@ -2,6 +2,7 @@ |
<head> |
<script src="../../resources/js-test.js"></script> |
<script> |
+ window.jsTestIsAsync = true; |
var givenScrollTop = 1; |
var givenScrollLeft = 2; |
var expectedScrollTop = 161; |
@@ -9,10 +10,7 @@ |
var event; |
var div; |
- if (window.testRunner) |
- testRunner.waitUntilDone(); |
- |
- function dispatchWheelEvent() |
+ function runTest() |
{ |
var overflowElement = document.getElementById("overflow"); |
if (overflowElement) |
@@ -23,17 +21,9 @@ |
eventSender.continuousMouseScrollBy(-window.givenScrollLeft, -window.givenScrollTop, true); |
} |
- setTimeout('checkOffsets();', 100); |
- } |
- |
- function checkOffsets() |
- { |
div = document.getElementById("overflow"); |
- shouldBe("div.scrollTop", "window.expectedScrollTop"); |
- shouldBe("div.scrollLeft", "window.expectedScrollLeft"); |
- |
- if (window.testRunner) |
- window.testRunner.notifyDone(); |
+ shouldBecomeEqual("div.scrollTop == window.expectedScrollTop && " + |
+ "div.scrollLeft == window.expectedScrollLeft", "true", finishJSTest); |
} |
function mousewheelHandler(e) |
@@ -50,7 +40,7 @@ |
</script> |
</head> |
- <body style="margin:0" onload="setTimeout('dispatchWheelEvent();', 100)"> |
+ <body style="margin:0" onload="runTest()"> |
<!-- This div is 200 pixels high. The content results in scrool bars on |
both edges, resulting in an effective content area of 185 x 185 on |
linux. The paging context overlap is 24 pixels. So one page of scroll |