OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta charset="utf-8"> | 4 <meta charset="utf-8"> |
5 <title>Scroll customization methods are called appropriately.</title> | 5 <title>Scroll customization methods are called appropriately.</title> |
6 <script src="../../../resources/testharness.js"></script> | 6 <script src="../../../resources/testharness.js"></script> |
7 <script src="../../../resources/testharnessreport.js"></script> | 7 <script src="../../../resources/testharnessreport.js"></script> |
8 <style> | 8 <style> |
9 | 9 |
10 * { | 10 * { |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 // while this test is still running. | 197 // while this test is still running. |
198 var flingTest = async_test("Touchscreen fling doesn't propagate."); | 198 var flingTest = async_test("Touchscreen fling doesn't propagate."); |
199 reset(); | 199 reset(); |
200 | 200 |
201 function assertScrollTops(cTop, aTop, scrollingElementTop, step) { | 201 function assertScrollTops(cTop, aTop, scrollingElementTop, step) { |
202 assert_equals(c.scrollTop, cTop, "For id 'c' on step " + step); | 202 assert_equals(c.scrollTop, cTop, "For id 'c' on step " + step); |
203 assert_equals(a.scrollTop, aTop, "For id 'a' on step " + step); | 203 assert_equals(a.scrollTop, aTop, "For id 'a' on step " + step); |
204 assert_equals(document.scrollingElement.scrollTop, scrollingElementTop, "F
or scrollingElement on step " + step); | 204 assert_equals(document.scrollingElement.scrollTop, scrollingElementTop, "F
or scrollingElement on step " + step); |
205 }; | 205 }; |
206 | 206 |
| 207 assertScrollTops(0, 0, 0, 0); |
| 208 |
207 var frame_actions = [ | 209 var frame_actions = [ |
208 function() { | 210 function() { |
209 eventSender.gestureFlingStart(10, 10, -1000000, -1000000, "touchscreen")
; | 211 eventSender.gestureFlingStart(10, 10, -1000000, -1000000, "touchscreen")
; |
210 }, | 212 }, |
211 flingTest.step_func(function() { | 213 flingTest.step_func(function() { |
212 assertScrollTops(0, 0, 0, 1); | 214 assertScrollTops(100, 0, 0, 1); |
213 }), | 215 }), |
214 flingTest.step_func(function() { | 216 flingTest.step_func(function() { |
215 assertScrollTops(100, 0, 0, 2); | 217 assertScrollTops(100, 0, 0, 2); |
216 }), | 218 }), |
217 flingTest.step_func(function() { | 219 flingTest.step_func(function() { |
218 assertScrollTops(100, 0, 0, 3); | 220 assertScrollTops(100, 0, 0, 3); |
219 }), | 221 }), |
220 flingTest.step_func(function() { | 222 flingTest.step_func(function() { |
221 assertScrollTops(100, 0, 0, 4); | 223 assertScrollTops(100, 0, 0, 4); |
222 flingTest.done(); | 224 flingTest.done(); |
(...skipping 12 matching lines...) Expand all Loading... |
235 window.requestAnimationFrame(raf); | 237 window.requestAnimationFrame(raf); |
236 } | 238 } |
237 | 239 |
238 executeFrameActions(frame_actions); | 240 executeFrameActions(frame_actions); |
239 } | 241 } |
240 } | 242 } |
241 | 243 |
242 </script> | 244 </script> |
243 </body> | 245 </body> |
244 </html> | 246 </html> |
OLD | NEW |