| Index: third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-page.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-page.html b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-page.html
|
| index c6c6572e5af433f6e8e287e2249f3388b9a68c9f..84aa292e330bce634bcd8d52fc4e0728d994ff85 100644
|
| --- a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-page.html
|
| +++ b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-page.html
|
| @@ -2,6 +2,7 @@
|
| <head>
|
| <script src="../../resources/js-test.js"></script>
|
| <script>
|
| + window.jsTestIsAsync = true;
|
| var givenScrollTop = 2; // Only page is scrolled per event, regardless of this number.
|
| var givenScrollLeft = 0;
|
| var expectedScrollTop = 525; // Window is 800x600. Scroll 87.5% of visible.
|
| @@ -9,11 +10,7 @@
|
| var event;
|
| var div;
|
|
|
| - window.jsTestIsAsync = true;
|
| - if (window.testRunner)
|
| - testRunner.waitUntilDone();
|
| -
|
| - function dispatchWheelEvent()
|
| + function runTest()
|
| {
|
| document.body.addEventListener("mousewheel", mousewheelHandler, false);
|
|
|
| @@ -22,14 +19,8 @@
|
| eventSender.continuousMouseScrollBy(-window.givenScrollLeft, -window.givenScrollTop, true);
|
| }
|
|
|
| - setTimeout('checkOffsets();', 100);
|
| - }
|
| -
|
| - function checkOffsets()
|
| - {
|
| - shouldBe("document.scrollingElement.scrollTop", "window.expectedScrollTop");
|
| - shouldBe("document.scrollingElement.scrollLeft", "window.expectedScrollLeft");
|
| - finishJSTest();
|
| + shouldBecomeEqual("document.scrollingElement.scrollTop == window.expectedScrollTop && " +
|
| + "document.scrollingElement.scrollLeft == window.expectedScrollLeft", "true", finishJSTest);
|
| }
|
|
|
| function mousewheelHandler(e)
|
| @@ -46,7 +37,7 @@
|
| </script>
|
| </head>
|
|
|
| - <body style="margin:0" onload="setTimeout('dispatchWheelEvent();', 100)">
|
| + <body style="margin:0" onload="runTest()">
|
| <div style="height:900px;width:400px">
|
| <div style="background-color:red;height:900px;width:200px;position:relative;left:0px;top:0px"></div>
|
| <div style="background-color:green;height:900px;width:200px;position:relative;left:200px;top:-900px"></div>
|
|
|