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

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: 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
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..c7b95df802076f75b9cfa55c847be9ac1e2d325f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/events/wheel-in-scrollbar.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<script>
+ 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');
dtapuska 2016/03/15 18:57:18 This test assumes that scrolling occurs on mouse s
+ shouldBe('overflowDiv.scrollTop', '0');
+ finishJSTest();
jbroman 2016/03/16 15:41:00 "finishJSTest()" without "jsTestIsAsync = true;" i
bokan 2016/03/16 18:01:45 Nope, it was cargo-culted. I've removed it since i
jbroman 2016/03/16 18:05:52 Actually, I think you do want jsTestIsAsync and fi
bokan 2016/03/16 19:18:15 Yah, I think you're right. I thought the layout te
+ }
+</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>

Powered by Google App Engine
This is Rietveld 408576698