Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-div.html

Issue 1413493005: Update layout tests to work when smooth scrolling is enabled by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: worked on nit Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-div.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-div.html b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-div.html
index 3b281d142632be02351a623fd875c7234f40b465..ef3042649f11c86605a7fce4ec9166be73a4db18 100644
--- a/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-div.html
+++ b/third_party/WebKit/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-div.html
@@ -2,6 +2,7 @@
<head>
<script src="../../resources/js-test.js"></script>
<script>
+ window.jsTestIsAsync = true;
var givenScrollTop = 2;
var givenScrollLeft = 0;
var expectedScrollTop = 322; // 2 pages, 161 * 2, see comment in HTML below.
@@ -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

Powered by Google App Engine
This is Rietveld 408576698