Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / touch / gesture / gesture-scrollbar-fling.html
blobb8652462fba2c428e887ad145b8436d106a3c448
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
4 <!-- This tests that the scrollbar thumb is deselected on a fling start -->
6 <head>
7 <style type="text/css">
8 ::-webkit-scrollbar {
9 background-color: #ccc;
10 height: 15px;
11 width: 15px;
14 ::-webkit-scrollbar-button {
15 display: none;
18 ::-webkit-scrollbar-thumb {
19 background-color: #777;
20 height: 15px;
21 width: 15px;
24 ::-webkit-scrollbar-thumb:active {
25 background-color: #333;
28 #scrollable {
29 height: 300px;
30 width: 300px;
31 overflow: scroll;
34 .large {
35 height: 600px;
36 width: 600px;
38 </style>
39 </head>
40 <body onload="runTest();">
41 <div id="scrollable">
42 <div class="large">
43 </div>
44 </div>
45 <div id="console"></div>
47 <script type="text/javascript">
50 function scrollTest() {
51 var movingDiv;
52 movingDiv = document.getElementById('scrollable');
53 var scrollbarX = movingDiv.offsetLeft + movingDiv.offsetWidth - 5;
54 var scrollThumbSafeOffset = 80;
55 var scrollbarY = movingDiv.offsetTop + scrollThumbSafeOffset;
57 // Ensure we use a touch with an area to test under touch adjustment
58 var touchWidth = 25;
59 var touchHeight = 25;
61 eventSender.gestureTapDown(scrollbarX, scrollbarY, touchWidth, touchHeight);
62 eventSender.gestureFlingStart(0, 0, 0, 0, "touchscreen");
65 function exitIfNecessary()
67 debug('Gesture events not implemented on this platform or broken');
68 isSuccessfullyParsed();
71 function runTest()
73 internals.settings.setMockScrollbarsEnabled(true);
75 if (window.eventSender) {
76 if (eventSender.clearTouchPoints)
77 scrollTest();
78 else
79 exitIfNecessary();
80 } else {
81 debug("This test requires DumpRenderTree.");
84 </script>
85 </body>
86 </html>