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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/wheel-in-scrollbar.html

Issue 1804063002: Fix wheel scrolling over scrollbar not scrolling page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made test async Created 4 years, 9 months 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/wheel-in-scrollbar-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/events/wheel-in-scrollbar.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/wheel-in-scrollbar.html b/third_party/WebKit/LayoutTests/fast/events/wheel-in-scrollbar.html
new file mode 100644
index 0000000000000000000000000000000000000000..ca4c57e4320aeead2517974f58cc383dd274fc07
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/events/wheel-in-scrollbar.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<script>
+ window.jsTestIsAsync = true;
+
+ description("Test that wheel scrolling over the page scrollbar scrolls " +
+ "the page. We also placed an overflow div below the " +
+ "scrollbar to make sure we target the page and not the div " +
+ "in that case.");
+
+ var overflowDiv;
+
+ window.onload = function() {
+ if (!window.testRunner || !window.eventSender)
+ return;
+
+ internals.settings.setScrollAnimatorEnabled(false);
+
+ overflowDiv = document.getElementById('overflowDiv');
+
+ // Move the mouse over the vertical scrollbar.
+ eventSender.mouseMoveTo(790, 300);
+
+ // Scroll down precisely by 30 px.
+ eventSender.continuousMouseScrollBy(0, -30, false, true);
+
+ shouldBe('window.scrollY', '30');
+ shouldBe('overflowDiv.scrollTop', '0');
+ finishJSTest();
+ }
+</script>
+
+<body style="margin:0">
+ <div id="overflowDiv" style="width:1000px; height:500px; overflow:scroll">
+ <div style="height: 1000px"></div>
+ </div>
+ <div style="height: 1000px"></div>
+</body>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/wheel-in-scrollbar-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698