| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <meta charset="utf-8"> | 2 <meta charset="utf-8"> |
| 3 <title>AnimationTiming Test: multiple calls to requestAnimationFrame with the sa
me callback</title> | 3 <title>AnimationTiming Test: multiple calls to requestAnimationFrame with the sa
me callback</title> |
| 4 <link rel="author" title="Intel" href="http://www.intel.com"> | 4 <link rel="author" title="Intel" href="http://www.intel.com"> |
| 5 <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-window-reques
tanimationframe"> | 5 <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-window-reques
tanimationframe"> |
| 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 <div id="log"></div> | 8 <div id="log"></div> |
| 9 <script> | 9 <script> |
| 10 | 10 |
| 11 async_test(function(t) { | 11 async_test(function(t) { |
| 12 var counter = 0; | 12 var counter = 0; |
| 13 window.requestAnimationFrame(callback); | 13 window.requestAnimationFrame(callback); |
| 14 | 14 |
| 15 function callback() { | 15 function callback() { |
| 16 ++counter; | 16 ++counter; |
| 17 if (counter == 2) { | 17 if (counter == 2) { |
| 18 t.done(); | 18 t.done(); |
| 19 } else { | 19 } else { |
| 20 window.requestAnimationFrame(callback); | 20 window.requestAnimationFrame(callback); |
| 21 } | 21 } |
| 22 }; | 22 }; |
| 23 | 23 |
| 24 }, "Check that multiple calls to requestAnimationFrame with the same callback
will result in multiple entries being in the list with that same callback."); | 24 }, "Check that multiple calls to requestAnimationFrame with the same callback
will result in multiple entries being in the list with that same callback."); |
| 25 | 25 |
| 26 </script> | 26 </script> |
| OLD | NEW |