OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <html> |
| 3 <head> |
| 4 <title>requestAnimationFrame in queue get the same timestamp</title> |
| 5 <script src="../../../../../resources/testharness.js"></script> |
| 6 <script src="../../../../../resources/testharnessreport.js"></script> |
| 7 <link rel="help" href="http://w3c.github.io/animation-timing/#dfn-invoke-cal
lbacks-algorithm"/> |
| 8 </head> |
| 9 <body> |
| 10 <div id="log"></div> |
| 11 <script> |
| 12 test(function (t) { |
| 13 var a = 0, b = 0; |
| 14 |
| 15 /* REASONING: |
| 16 * These two methods that will be called with a timestamp. Because |
| 17 * they execute right after eachother, they're added to the same |
| 18 * queue and SHOULD be timestamped with the same value. |
| 19 */ |
| 20 window.requestAnimationFrame(function() { a = arguments[0]; }); |
| 21 window.requestAnimationFrame(function() { b = arguments[0]; }); |
| 22 |
| 23 setTimeout(function() { |
| 24 assert_true(a != 0); |
| 25 assert_true(b != 0); |
| 26 assert_true(a == b); |
| 27 }, 100); |
| 28 }, "requestAnimationFrame will timestamp events in the same queue with the
same time"); |
| 29 </script> |
| 30 </body> |
| 31 </html> |
OLD | NEW |