| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 test(function() { | 182 test(function() { |
| 183 reset(); | 183 reset(); |
| 184 | 184 |
| 185 for (var i = 0; i < deltas.length; ++i) | 185 for (var i = 0; i < deltas.length; ++i) |
| 186 applyDelta(deltas[i]); | 186 applyDelta(deltas[i]); |
| 187 | 187 |
| 188 for (var i = 0; i < elements.length; ++i) { | 188 for (var i = 0; i < elements.length; ++i) { |
| 189 assert_equals(elements[i].numberOfScrollBegins, deltas.length, "Incorrect
number of begin events for " + elements[i].id); | 189 assert_equals(elements[i].numberOfScrollBegins, deltas.length, "Incorrect
number of begin events for " + elements[i].id); |
| 190 assert_equals(elements[i].numberOfScrollEnds, deltas.length, "Incorrect nu
mber of end events for " + elements[i].id); | 190 assert_equals(elements[i].numberOfScrollEnds, deltas.length, "Incorrect nu
mber of end events for " + elements[i].id); |
| 191 } | 191 } |
| 192 }, "Correct number of scroll end and begin events observed."); | 192 }, "Correct number of scroll begin and end events observed."); |
| 193 | 193 |
| 194 { | 194 { |
| 195 // NOTE - this async test needs to be run last, as it shares state with the | 195 // NOTE - this async test needs to be run last, as it shares state with the |
| 196 // other tests. If other tests are run after it, they'll modify the state | 196 // other tests. If other tests are run after it, they'll modify the state |
| 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); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 window.requestAnimationFrame(raf); | 235 window.requestAnimationFrame(raf); |
| 236 } | 236 } |
| 237 | 237 |
| 238 executeFrameActions(frame_actions); | 238 executeFrameActions(frame_actions); |
| 239 } | 239 } |
| 240 } | 240 } |
| 241 | 241 |
| 242 </script> | 242 </script> |
| 243 </body> | 243 </body> |
| 244 </html> | 244 </html> |
| OLD | NEW |