OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <link rel="stylesheet" href="../../../js/resources/js-test-style.css"> | 4 <link rel="stylesheet" href="../../../js/resources/js-test-style.css"> |
5 <script src="../../../js/resources/js-test-pre.js"></script> | 5 <script src="../../../js/resources/js-test-pre.js"></script> |
6 <script src="resources/gesture-helpers.js"></script> | 6 <script src="resources/gesture-helpers.js"></script> |
7 <style type="text/css"> | 7 <style type="text/css"> |
8 | 8 |
9 ::-webkit-scrollbar { | 9 ::-webkit-scrollbar { |
10 width: 0px; | 10 width: 0px; |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 var gesturesOccurred = 0; | 109 var gesturesOccurred = 0; |
110 var scrollAmountX = ['0', '0']; | 110 var scrollAmountX = ['0', '0']; |
111 var scrollAmountY = ['0', '25']; | 111 var scrollAmountY = ['0', '25']; |
112 var wheelEventsOccurred = 0; | 112 var wheelEventsOccurred = 0; |
113 var expectedWheelEventsOccurred = ['0', '0']; | 113 var expectedWheelEventsOccurred = ['0', '0']; |
114 var scrollEventsOccurred = 0; | 114 var scrollEventsOccurred = 0; |
115 var scrolledElement = 'movedbox' | 115 var scrolledElement = 'movedbox' |
116 var scrollEventsOccurred = 0; | 116 var scrollEventsOccurred = 0; |
117 var expectedScrollEventsOccurred = '1'; | 117 var expectedScrollEventsOccurred = '1'; |
118 | 118 |
119 | |
120 function recordScroll(event) { | |
121 debug('scroll event ' + scrollEventsOccurred + '+> ' + event.target); | |
122 scrollEventsOccurred++; | |
123 | |
124 if (window.eventSender) { | |
125 // Because scroll events arrive asynchronously, only one will ar
rive. | |
126 if (gesturesOccurred == expectedGesturesTotal) { | |
127 shouldBe('scrollEventsOccurred', expectedScrollEventsOcc
urred); | |
128 // If we've got here, we've passed. | |
129 successfullyParsed = true; | |
130 isSuccessfullyParsed(); | |
131 if (window.testRunner) | |
132 testRunner.notifyDone(); | |
133 } | |
134 } | |
135 } | |
136 | |
137 | |
138 function firstGestureScroll() | 119 function firstGestureScroll() |
139 { | 120 { |
140 debug("first gesture"); | 121 debug("first gesture"); |
141 eventSender.gestureScrollBegin(10, 72); | 122 eventSender.gestureScrollBegin(10, 72); |
142 eventSender.gestureScrollUpdate(0, -230); | 123 eventSender.gestureScrollUpdate(0, -200); |
| 124 eventSender.gestureScrollUpdate(0, -30); |
143 eventSender.gestureScrollEnd(0, 0); | 125 eventSender.gestureScrollEnd(0, 0); |
144 | 126 |
145 // Wait for layout. | 127 // Wait for layout. |
146 checkScrollOffset(); | 128 checkScrollOffset(); |
147 } | 129 } |
148 | 130 |
149 function secondGestureScroll() | 131 function secondGestureScroll() |
150 { | 132 { |
151 debug("second gesture"); | 133 debug("second gesture"); |
152 eventSender.gestureScrollBegin(12, 40); | 134 eventSender.gestureScrollBegin(12, 40); |
153 eventSender.gestureScrollUpdate(0, -45); | 135 eventSender.gestureScrollUpdate(0, -20); |
| 136 eventSender.gestureScrollUpdate(0, -25); |
154 eventSender.gestureScrollEnd(0, 0); | 137 eventSender.gestureScrollEnd(0, 0); |
155 | 138 |
156 // Wait for layout. | 139 // Wait for layout. |
157 checkScrollOffset(); | 140 checkScrollOffset(); |
158 } | 141 } |
159 | 142 |
160 if (window.testRunner) | 143 if (window.testRunner) |
161 testRunner.waitUntilDone(); | 144 testRunner.waitUntilDone(); |
162 | 145 |
163 function runTest() | 146 function runTest() |
(...skipping 14 matching lines...) Expand all Loading... |
178 } else { | 161 } else { |
179 debug("This test requires DumpRenderTree. Gesture-scroll the page to va
lidate the implementation."); | 162 debug("This test requires DumpRenderTree. Gesture-scroll the page to va
lidate the implementation."); |
180 } | 163 } |
181 } | 164 } |
182 </script> | 165 </script> |
183 | 166 |
184 | 167 |
185 | 168 |
186 </body> | 169 </body> |
187 </html> | 170 </html> |
OLD | NEW |