| 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 | |
| 209 var frame_actions = [ | 207 var frame_actions = [ |
| 210 function() { | 208 function() { |
| 211 eventSender.gestureFlingStart(10, 10, -1000000, -1000000, "touchscreen")
; | 209 eventSender.gestureFlingStart(10, 10, -1000000, -1000000, "touchscreen")
; |
| 212 }, | 210 }, |
| 213 flingTest.step_func(function() { | 211 flingTest.step_func(function() { |
| 214 assertScrollTops(100, 0, 0, 1); | 212 assertScrollTops(0, 0, 0, 1); |
| 215 }), | 213 }), |
| 216 flingTest.step_func(function() { | 214 flingTest.step_func(function() { |
| 217 assertScrollTops(100, 0, 0, 2); | 215 assertScrollTops(100, 0, 0, 2); |
| 218 }), | 216 }), |
| 219 flingTest.step_func(function() { | 217 flingTest.step_func(function() { |
| 220 assertScrollTops(100, 0, 0, 3); | 218 assertScrollTops(100, 0, 0, 3); |
| 221 }), | 219 }), |
| 222 flingTest.step_func(function() { | 220 flingTest.step_func(function() { |
| 223 assertScrollTops(100, 0, 0, 4); | 221 assertScrollTops(100, 0, 0, 4); |
| 224 flingTest.done(); | 222 flingTest.done(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 237 window.requestAnimationFrame(raf); | 235 window.requestAnimationFrame(raf); |
| 238 } | 236 } |
| 239 | 237 |
| 240 executeFrameActions(frame_actions); | 238 executeFrameActions(frame_actions); |
| 241 } | 239 } |
| 242 } | 240 } |
| 243 | 241 |
| 244 </script> | 242 </script> |
| 245 </body> | 243 </body> |
| 246 </html> | 244 </html> |
| OLD | NEW |