Chromium Code Reviews| 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> |