OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../../../resources/js-test.js"></script> | 4 <script src="../../../../resources/js-test.js"></script> |
5 <script src="resources/gesture-helpers.js"></script> | 5 <script src="resources/gesture-helpers.js"></script> |
6 <style type="text/css"> | 6 <style type="text/css"> |
7 ::-webkit-scrollbar { | 7 ::-webkit-scrollbar { |
8 width: 0px; | 8 width: 0px; |
9 height: 0px; | 9 height: 0px; |
10 } | 10 } |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 var p = document.createElement('tr'); | 100 var p = document.createElement('tr'); |
101 p.innerHTML = '<td><div id="redbox"></div></td>'; | 101 p.innerHTML = '<td><div id="redbox"></div></td>'; |
102 table.appendChild(p); | 102 table.appendChild(p); |
103 } | 103 } |
104 } | 104 } |
105 | 105 |
106 function firstGestureScroll() | 106 function firstGestureScroll() |
107 { | 107 { |
108 debug("first gesture"); | 108 debug("first gesture"); |
109 eventSender.gestureScrollBegin(10, 72); | 109 eventSender.gestureScrollBegin(10, 72); |
110 eventSender.gestureScrollUpdateWithoutPropagation(0, -110); | 110 eventSender.gestureScrollUpdate(0, -110, true); |
111 eventSender.gestureScrollEnd(0, 0); | 111 eventSender.gestureScrollEnd(0, 0); |
112 | 112 |
113 // Wait for layout. | 113 // Wait for layout. |
114 checkScrollOffset(); | 114 checkScrollOffset(); |
115 } | 115 } |
116 | 116 |
117 function secondGestureScroll() | 117 function secondGestureScroll() |
118 { | 118 { |
119 debug("second gesture"); | 119 debug("second gesture"); |
120 eventSender.gestureScrollBegin(12, 40); | 120 eventSender.gestureScrollBegin(12, 40); |
121 eventSender.gestureScrollUpdateWithoutPropagation(0, -200); | 121 eventSender.gestureScrollUpdate(0, -200, true); |
122 eventSender.gestureScrollUpdateWithoutPropagation(0, -160); | 122 eventSender.gestureScrollUpdate(0, -160, true); |
123 eventSender.gestureScrollEnd(0, 0); | 123 eventSender.gestureScrollEnd(0, 0); |
124 | 124 |
125 // Wait for layout. | 125 // Wait for layout. |
126 checkScrollOffset(); | 126 checkScrollOffset(); |
127 } | 127 } |
128 | 128 |
129 if (window.testRunner) | 129 if (window.testRunner) |
130 testRunner.waitUntilDone(); | 130 testRunner.waitUntilDone(); |
131 | 131 |
132 function runTest() | 132 function runTest() |
133 { | 133 { |
134 buildPage(); | 134 buildPage(); |
135 touchtarget = document.getElementById('touchtargetdiv'); | 135 touchtarget = document.getElementById('touchtargetdiv'); |
136 touchtarget.addEventListener("scroll", recordScroll); | 136 touchtarget.addEventListener("scroll", recordScroll); |
137 touchtarget.addEventListener("mousewheel", recordWheel); | 137 touchtarget.addEventListener("mousewheel", recordWheel); |
138 | 138 |
139 if (window.eventSender) { | 139 if (window.eventSender) { |
140 description('This tests that a gesture scroll is not propagated from a d
iv ' + | 140 description('This tests that a gesture scroll is not propagated from a d
iv ' + |
141 'to the page when the div has no remaining scroll offset when '
+ | 141 'to the page when the div has no remaining scroll offset when '
+ |
142 'the GestureScrollUpdateWithoutPropagation event type is used.')
; | 142 'the preventPropagation flag is set for the GestureScrollUpdate
event.'); |
143 if (checkTestDependencies() && window.eventSender.gestureScrollUpdateWit
houtPropagation) | 143 if (checkTestDependencies() && window.eventSender.gestureScrollUpdate) |
144 firstGestureScroll(); | 144 firstGestureScroll(); |
145 else | 145 else |
146 exitIfNecessary(); | 146 exitIfNecessary(); |
147 } else { | 147 } else { |
148 debug("This test requires DumpRenderTree. Gesture-scroll the page to va
lidate the implementation."); | 148 debug("This test requires DumpRenderTree. Gesture-scroll the page to va
lidate the implementation."); |
149 } | 149 } |
150 } | 150 } |
151 </script> | 151 </script> |
152 | 152 |
153 | 153 |
154 | 154 |
155 </body> | 155 </body> |
156 </html> | 156 </html> |
OLD | NEW |