blob: ecf62d61febebea5193343180c8f17bd3b0dba8f [file] [log] [blame]
<!DOCTYPE HTML>
<html>
<head>
<script src="../resources/js-test-pre.js"></script>
</head>
<body>
<script>
var timestamp1 = 0;
var currentFrame = 0;
const MaxFrames = 10;
function doAnimation(timestamp)
{
timestamp1 = timestamp;
shouldBeGreaterThanOrEqual("Math.round(window.performance.now())", "Math.round(timestamp1)");
if (++currentFrame == MaxFrames) {
finishJSTest();
return;
}
requestAnimationFrame(doAnimation);
}
window.jsTestIsAsync = true;
description("Test performance.now() is at least as the timestamp the rAF callback.");
requestAnimationFrame(doAnimation);
</script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>