blob: 7586d39d4a9439efbc5d7537972fb32e54002da1 [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("Tests adding one callback within another");
var e = document.getElementById("e");
var sameFrame;
window.requestAnimationFrame(function() {
sameFrame = true;
}, e);
window.requestAnimationFrame(function() {
window.requestAnimationFrame(function() {
shouldBeFalse("sameFrame");
}, e);
}, e);
window.requestAnimationFrame(function() {
sameFrame = false;
}, e);
onload = async () => {
testRunner?.waitUntilDone();
// This should fire the three already registered callbacks, but not the one dynamically registered.
await testRunner?.displayAndTrackRepaints();
// This should fire the dynamically registered callback.
await testRunner?.displayAndTrackRepaints();
setTimeout(function() {
isSuccessfullyParsed();
if (window.testRunner)
testRunner.notifyDone();
}, 200);
}
</script>
</body>
</html>