diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /testing/web-platform/tests/html/webappapis/animation-frames/same-dispatch-time.html | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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> |