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

Unified Diff: third_party/WebKit/LayoutTests/fast/scrolling/fixed-position-behind-scrollbar.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/scrolling/fixed-position-behind-scrollbar.html
diff --git a/third_party/WebKit/LayoutTests/fast/scrolling/fixed-position-behind-scrollbar.html b/third_party/WebKit/LayoutTests/fast/scrolling/fixed-position-behind-scrollbar.html
index df860f23c72deaa91ac75f55987b2bbb25204191..a6c3a2203d610da09ae62ddc84a01c718871ab8d 100644
--- a/third_party/WebKit/LayoutTests/fast/scrolling/fixed-position-behind-scrollbar.html
+++ b/third_party/WebKit/LayoutTests/fast/scrolling/fixed-position-behind-scrollbar.html
@@ -19,14 +19,21 @@ element, and that the scrollbars are excluded from the viewport for determining
the element's position.
<div id="f"></div>
<script>
+window.jsTestIsAsync = true;
-eventSender.mouseMoveTo(790, 500);
-eventSender.mouseDown();
-eventSender.mouseUp();
+function finishTest() {
+ var rect = document.querySelector("#f").getBoundingClientRect();
+ shouldBe(rect.left + "," + rect.top, "205,205");
+ finishJSTest();
+}
-var rect = document.querySelector("#f").getBoundingClientRect();
+function runTest() {
+ eventSender.mouseMoveTo(790, 500);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ shouldBecomeEqual('scrollY > 0', 'true', finishTest);
+}
-shouldBeTrue(String(scrollY > 0));
-shouldBe(rect.left + "," + rect.top, "205,205");
+onload = runTest;
</script>

Powered by Google App Engine
This is Rietveld 408576698