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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/touch/gesture/gesture-scroll-by-pixel.html

Issue 1557993002: Add scroll units in GestureEvents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix layout test on Mac Created 4 years, 11 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../../resources/js-test.js"></script>
5 <style type="text/css">
6 ::-webkit-scrollbar {
7 width: 0px;
8 height: 0px;
9 }
10
11 #greenbox {
12 width: 100px;
13 height: 2000px;
14 background: green;
15 }
16 #redbox {
17 width: 100px;
18 height: 2000px;
19 background: red;
20 }
21
22 </style>
23 </head>
24 <body style="margin:0" onload="runTest();">
25
26 <div id="greenbox"></div>
27 <div id="redbox"></div>
28
29 <p id="description"></p>
30 <div id="console"></div>
31 <script type="text/javascript">
32
33 function gestureScroll()
34 {
35 eventSender.gestureScrollBegin("touchpad", 10, 20);
36 eventSender.gestureScrollUpdate("touchpad", 0, -100, false, "Pixels");
37 eventSender.gestureScrollUpdate("touchpad", 0, -215, false, "Pixels");
38 eventSender.gestureScrollUpdate("touchpad", 0, 20, false, "Pixels");
39 eventSender.gestureScrollEnd("touchpad", 0, 0);
40
41 shouldBecomeEqual("document.scrollingElement.scrollTop", "295", finishJSTest , 1000);
42 }
43
44 jsTestIsAsync = true;
45
46 function runTest()
47 {
48 if (window.eventSender) {
49 description('This tests gesture scrolling by non-precise pixels.');
50 gestureScroll();
51 } else {
52 debug("This test requires DumpRenderTree. Gesture-scroll the page to va lidate the implementation.");
53 }
54 }
55 </script>
56
57 </body>
58 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698