OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 | 3 |
4 <!-- This tests that the scrollbar thumb is deselected on a fling start --> | 4 <!-- This tests that the scrollbar thumb is deselected on a fling start --> |
5 | 5 |
6 <head> | 6 <head> |
7 <style type="text/css"> | 7 <style type="text/css"> |
8 ::-webkit-scrollbar { | 8 ::-webkit-scrollbar { |
9 background-color: #ccc; | 9 background-color: #ccc; |
10 height: 15px; | 10 height: 15px; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 movingDiv = document.getElementById('scrollable'); | 52 movingDiv = document.getElementById('scrollable'); |
53 var scrollbarX = movingDiv.offsetLeft + movingDiv.offsetWidth - 5; | 53 var scrollbarX = movingDiv.offsetLeft + movingDiv.offsetWidth - 5; |
54 var scrollThumbSafeOffset = 80; | 54 var scrollThumbSafeOffset = 80; |
55 var scrollbarY = movingDiv.offsetTop + scrollThumbSafeOffset; | 55 var scrollbarY = movingDiv.offsetTop + scrollThumbSafeOffset; |
56 | 56 |
57 // Ensure we use a touch with an area to test under touch adjustment | 57 // Ensure we use a touch with an area to test under touch adjustment |
58 var touchWidth = 25; | 58 var touchWidth = 25; |
59 var touchHeight = 25; | 59 var touchHeight = 25; |
60 | 60 |
61 eventSender.gestureTapDown(scrollbarX, scrollbarY, touchWidth, touchHeight); | 61 eventSender.gestureTapDown(scrollbarX, scrollbarY, touchWidth, touchHeight); |
62 eventSender.gestureFlingStart(0, 0, 0, 0, "touchscreen"); | 62 eventSender.gestureFlingStart(0, 0, 1, 0, "touchscreen"); |
63 } | 63 } |
64 | 64 |
65 function exitIfNecessary() | 65 function exitIfNecessary() |
66 { | 66 { |
67 debug('Gesture events not implemented on this platform or broken'); | 67 debug('Gesture events not implemented on this platform or broken'); |
68 isSuccessfullyParsed(); | 68 isSuccessfullyParsed(); |
69 } | 69 } |
70 | 70 |
71 function runTest() | 71 function runTest() |
72 { | 72 { |
73 internals.settings.setMockScrollbarsEnabled(true); | 73 internals.settings.setMockScrollbarsEnabled(true); |
74 | 74 |
75 if (window.eventSender) { | 75 if (window.eventSender) { |
76 if (eventSender.clearTouchPoints) | 76 if (eventSender.clearTouchPoints) |
77 scrollTest(); | 77 scrollTest(); |
78 else | 78 else |
79 exitIfNecessary(); | 79 exitIfNecessary(); |
80 } else { | 80 } else { |
81 debug("This test requires DumpRenderTree."); | 81 debug("This test requires DumpRenderTree."); |
82 } | 82 } |
83 } | 83 } |
84 </script> | 84 </script> |
85 </body> | 85 </body> |
86 </html> | 86 </html> |
OLD | NEW |