diff options
Diffstat (limited to 'testing/web-platform/tests/html/webappapis/animation-frames/same-dispatch-time.html')
-rw-r--r-- | testing/web-platform/tests/html/webappapis/animation-frames/same-dispatch-time.html | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/webappapis/animation-frames/same-dispatch-time.html b/testing/web-platform/tests/html/webappapis/animation-frames/same-dispatch-time.html new file mode 100644 index 0000000000..28e94f1e33 --- /dev/null +++ b/testing/web-platform/tests/html/webappapis/animation-frames/same-dispatch-time.html @@ -0,0 +1,31 @@ +<!doctype html> +<html> + <head> + <title>requestAnimationFrame in queue get the same timestamp</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <link rel="help" href="http://w3c.github.io/animation-timing/#dfn-invoke-callbacks-algorithm"/> + </head> + <body> + <div id="log"></div> + <script> + async_test(function (t) { + var a = 0, b = 0; + + /* REASONING: + * These two methods that will be called with a timestamp. Because + * they execute right after eachother, they're added to the same + * queue and SHOULD be timestamped with the same value. + */ + requestAnimationFrame(t.step_func(function() { a = arguments[0]; })); + requestAnimationFrame(t.step_func(function() { + b = arguments[0]; + assert_not_equals(a, 0); + assert_not_equals(b, 0); + assert_equals(a, b); + t.done(); + })); + }, "requestAnimationFrame will timestamp events in the same queue with the same time"); + </script> + </body> +</html> |