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

Unified Diff: third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/mousewheel-scroll.html

Issue 1547003002: Fix error in determining the target position for smooth scroll animation curve (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add test Created 5 years 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/scroll-behavior/smooth-scroll/mousewheel-scroll.html
diff --git a/third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/mousewheel-scroll.html b/third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/mousewheel-scroll.html
index 702dbf148ac7116b0dac2896aac2bf5a3e1bed4f..2150050e13937e2c0782aebd586f0a3585210362 100644
--- a/third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/mousewheel-scroll.html
+++ b/third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/mousewheel-scroll.html
@@ -15,6 +15,21 @@
smooth scrolling on the compositor works as intended (tested via\
virtual suite virtual/threaded/).");
+ function testDiagonalScroll() {
+ // Reset
+ document.scrollingElement.scrollTop = 0;
+ document.scrollingElement.scrollLeft = 0;
+
+ eventSender.mouseMoveTo(20, 20);
+ // Scroll 3 ticks diagonally.
+ eventSender.mouseScrollBy(-3, -3);
+ // Undo 1 tick in each direction.
+ eventSender.mouseScrollBy(1, 1);
+ // 40px per tick.
+ shouldBecomeEqual("document.scrollingElement.scrollTop == 80 && " +
Rick Byers 2015/12/23 19:13:33 Should this perhaps use different expected scroll
ymalik 2015/12/23 19:20:37 Done.
+ "document.scrollingElement.scrollLeft == 80", "true", finishJSTest);
+ }
+
function runTest() {
if (!window.eventSender || !window.internals) {
finishJSTest();
@@ -27,19 +42,17 @@
eventSender.mouseMoveTo(20, 20);
// Scroll down 3 ticks.
eventSender.mouseScrollBy(0, -1);
- eventSender.mouseScrollBy(0, -1);
- eventSender.mouseScrollBy(0, -1);
+ eventSender.mouseScrollBy(0, -2);
// Scroll right 3 ticks.
eventSender.mouseScrollBy(-1, 0);
- eventSender.mouseScrollBy(-1, 0);
- eventSender.mouseScrollBy(-1, 0);
+ eventSender.mouseScrollBy(-2, 0);
// Undo 1 tick in each direction.
eventSender.mouseScrollBy(0, 1);
eventSender.mouseScrollBy(1, 0);
// 40px per tick.
shouldBecomeEqual("document.scrollingElement.scrollTop == 80 && " +
- "document.scrollingElement.scrollLeft == 80", "true", finishJSTest);
+ "document.scrollingElement.scrollLeft == 80", "true", testDiagonalScroll);
}
</script>

Powered by Google App Engine
This is Rietveld 408576698