Commit Graph

3 Commits

Author SHA1 Message Date
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
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
Callum Law
33c0e55762 LibWeb: Check navigable container for whether element needs style update
The style of an element depends on it's navigable's viewport size which
in turn depends on the navigable's container's style - so if requires a
style update then so does the original element.
2026-03-09 14:36:18 +00:00