Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /html/dom/render-blocking/element-render-blocking-form-stack-removal.html?misnested - WPT Dashboard Interop Dashboard
- /html/dom/render-blocking/element-render-blocking-form-stack-removal.html?nested - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta name="timeout" content="long">
<meta name="variant" content="?nested">
<meta name="variant" content="?misnested">
<title>rel=expect stops blocking after a form leaves the parser stack</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/utils.js"></script>
<link rel="expect" href="#target" blocking="render">
<script>
let targetParsed = false;
let parsingFinished = false;
async_test(t => {
requestAnimationFrame(t.step_func_done(() => {
assert_true(targetParsed, "Rendering waits for the target");
assert_false(parsingFinished,
"Removing the form from the parser stack unblocks rendering");
}));
}, "A form removed from the parser stack satisfies rel=expect");
</script>
<body>
<script>
generateParserDelay();
</script>
<script>
if (location.search === "?misnested") {
document.write('<form id="target"><div></form></div>');
} else {
document.write('<form id="target"><div></div></form>');
}
targetParsed = true;
</script>
<script>
generateParserDelay();
</script>
<script>
parsingFinished = true;
</script>