blob: 2af3b2a29bc92950151ca781457209c7e858fe0b [file] [edit]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<span id="e"></span>
<span id="f"></span>
<script>
description("This tests cancelling a requestAnimationFrame callback");
var callbackFired = false;
var e = document.getElementById("e");
var id = window.requestAnimationFrame(function() {
}, e);
onload = async () => {
window.cancelAnimationFrame(id);
testRunner?.waitUntilDone();
await testRunner?.displayAndTrackRepaints();
setTimeout(function() {
shouldBeFalse("callbackFired");
}, 100);
setTimeout(function() {
isSuccessfullyParsed();
if (window.testRunner)
testRunner.notifyDone();
}, 200);
}
</script>
</body>
</html>