Files
ladybird/Tests/LibWeb/Text/input/css/element-requires-update-if-navigable-container-does.html
Aliaksandr Kalenik b36f2361f1 Tests: Fix flaky iframe srcdoc test to wait for actual content
The test checked iframe.contentDocument?.readyState !== "complete" to
decide whether to wait for the iframe's load event. However, the
initial about:blank document has readyState "complete", so this check
passes immediately even when the srcdoc navigation hasn't activated
yet. Under heavy load with sanitizers, the srcdoc document activation
is delayed long enough for the test to proceed with the about:blank
document, causing a TypeError when querySelector("#target") returns
null.

Fix by waiting for the actual srcdoc content to appear rather than
relying on readyState. Use a while loop with { once: true } load
event listeners to handle the case where multiple load events fire
(one for about:blank, one for srcdoc).
2026-03-31 09:47:59 +02:00

960 B