1
0
Fork 0
firefox/testing/web-platform/tests/html/dom/render-blocking/remove-pending-async-render-blocking-script.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

19 lines
761 B
HTML

<!DOCTYPE html>
<title>Removed render-blocking script should not indefinitely block rendering</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script id="target" async blocking="render"
src="support/dummy-1.js?pipe=trickle(d1)"></script>
<script>
promise_test(async () => {
const target = document.getElementById('target');
const newDoc = document.implementation.createHTMLDocument('new document');
newDoc.documentElement.appendChild(target);
await new Promise(resolve => requestAnimationFrame(resolve));
// reqeustAnimationFrame() should be eventually run, but the script removed
// while pending should not be run.
assert_equals(window.dummy, undefined);
});
</script>