1
0
Fork 0
firefox/testing/web-platform/tests/html/webappapis/animation-frames/same-dispatch-time.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

31 lines
1.1 KiB
HTML

<!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>