Index: third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-page.html |
diff --git a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-page.html b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-page.html |
index ced4f392cdd1d5f0e76c29b2e7407e3bfd3e341a..f6cc3009bed14cc5e9fbb28647826484c1a43dcb 100644 |
--- a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-page.html |
+++ b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-page.html |
@@ -2,6 +2,7 @@ |
<head> |
<script src="../../resources/js-test.js"></script> |
<script> |
+ window.jsTestIsAsync = true; |
var givenScrollTop = 0; |
var givenScrollLeft = 2; // When paging, this is ignored. Every event is one page. |
var expectedScrollTop = 0; |
@@ -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,9 @@ |
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(); |
+ // This test expects failure on mac: crbug.com/552694. |
+ shouldBecomeEqual("document.scrollingElement.scrollTop == window.expectedScrollTop && " + |
+ "document.scrollingElement.scrollLeft == window.expectedScrollLeft", "true", finishJSTest); |
} |
function mousewheelHandler(e) |
@@ -46,7 +38,7 @@ |
</script> |
</head> |
- <body style="margin:0;padding:0" onload="setTimeout('dispatchWheelEvent();', 100)"> |
+ <body style="margin:0;padding:0" onload="runTest()"> |
<div style="margin:0;padding:0;height:200px;width:2400px"> |
<div style="margin:0;padding:0;background-color:red;height:200px;width:1200px;position:relative;left:0px;top:0px"></div> |
<div style="margin:0;padding:0;background-color:green;height:200px;width:1200px;position:relative;left:1200px;top:-200px"></div> |