| 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..222d0844487550356b5c05e49a43b4a7f3546c00 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 2 ticks in each direction.
|
| + eventSender.mouseScrollBy(2, 2);
|
| + // 40px per tick.
|
| + shouldBecomeEqual("document.scrollingElement.scrollTop == 40 && " +
|
| + "document.scrollingElement.scrollLeft == 40", "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>
|
|
|
|
|