diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/html/webappapis/animation-frames/same-dispatch-time.html | |
parent | Initial commit. (diff) | |
download | firefox-upstream.tar.xz firefox-upstream.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
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> |