Chromium Code Reviews

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

Issue 1543043004: Reland of un smooth scroll animations on the compositor when possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <style>
4 body {
5 height: 2000px;
6 width: 2000px;
7 }
8 </style>
9
10 <script>
11 window.jsTestIsAsync = true;
12
13 description("This test ensures that consecutive mouse wheel ticks scroll\
14 to the right offset. The main purpose of this test is to ensure that\
15 smooth scrolling on the compositor works as intended (tested via\
16 virtual suite virtual/threaded/).");
17
18 function runTest() {
19 if (!window.eventSender || !window.internals) {
20 finishJSTest();
21 return;
22 }
23
24 // Turn on smooth scrolling.
25 internals.settings.setScrollAnimatorEnabled(true);
26
27 eventSender.mouseMoveTo(20, 20);
28 // Scroll down 3 ticks.
29 eventSender.mouseScrollBy(0, -1);
30 eventSender.mouseScrollBy(0, -1);
31 eventSender.mouseScrollBy(0, -1);
32 // Scroll right 3 ticks.
33 eventSender.mouseScrollBy(-1, 0);
34 eventSender.mouseScrollBy(-1, 0);
35 eventSender.mouseScrollBy(-1, 0);
36 // Undo 1 tick in each direction.
37 eventSender.mouseScrollBy(0, 1);
38 eventSender.mouseScrollBy(1, 0);
39
40 // 40px per tick.
41 shouldBecomeEqual("document.scrollingElement.scrollTop == 80 && " +
42 "document.scrollingElement.scrollLeft == 80", "true", finishJSTest);
43 }
44 </script>
45
46 <body onload="runTest()"></body>
OLDNEW

Powered by Google App Engine