same-dispatch-time.html (1098B)
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-callbacks-algorithm"/> 8 </head> 9 <body> 10 <div id="log"></div> 11 <script> 12 async_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 requestAnimationFrame(t.step_func(function() { a = arguments[0]; })); 21 requestAnimationFrame(t.step_func(function() { 22 b = arguments[0]; 23 assert_not_equals(a, 0); 24 assert_not_equals(b, 0); 25 assert_equals(a, b); 26 t.done(); 27 })); 28 }, "requestAnimationFrame will timestamp events in the same queue with the same time"); 29 </script> 30 </body> 31 </html>