Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

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