Skip to content

Truly independent web browser

Tests/LibWeb: Ignore a hidden-document test’s requests while rendering

sideshowbarkerd931a92691f0
diff --git a/Tests/LibWeb/Text/input/HTML/rendering-opportunity-hidden-document.html b/Tests/LibWeb/Text/input/HTML/rendering-opportunity-hidden-document.html
index 883ec0fc9ec..6c06c772925 100644
--- a/Tests/LibWeb/Text/input/HTML/rendering-opportunity-hidden-document.html
+++ b/Tests/LibWeb/Text/input/HTML/rendering-opportunity-hidden-document.html
@@ -11,8 +11,10 @@
function printRenderingSchedule(title, trace) {
println(title);
+ // A request made while rendering comes from the rendering work itself, never from the test, and the work an
+ // opportunity starts can make one before the trace is taken.
for (const line of trace.split("\n")) {
- if (/^(request|opportunity|update$)/.test(line))
+ if (/^(request(?! while rendering)|opportunity|update$)/.test(line))
println(` ${line}`);
}
}