Files
ladybird/Tests/LibWeb/Text/input/css/element-requires-update-if-navigable-container-does.html
Callum Law 9b4cd4fe62 Tests: Fix flaky test timeout
If the iframe had loaded before the test was executed this would timeout
2026-03-12 12:00:44 +01:00

42 lines
941 B
HTML

<!doctype html>
<style>
iframe {
width: 50px;
height: 0px;
}
</style>
<iframe
id="iframe"
srcdoc="
<div id=target></div>
<style>
#target {
order: calc(100vh / 1px);
}
</style>
"
></iframe>
<script src="../include.js"></script>
<script>
asyncTest(async done => {
if (iframe.contentDocument?.readyState !== "complete")
await new Promise(resolve => iframe.addEventListener("load", resolve));
requestAnimationFrame(() => {
requestAnimationFrame(() => {
const target = iframe.contentDocument.querySelector("#target");
println(getComputedStyle(target).order);
for (let height of [1, 2, 3]) {
iframe.style.height = `${height}px`;
println(getComputedStyle(target).order);
}
done();
});
});
});
</script>