gui tests: purpose-filter doesn't count WebKit's "ResizeObserver loop completed with undelivered notifications" as a page error

webkit en and zh failed in the full suite and under load with errors ==
['ResizeObserver loop completed with undelivered notifications.']. Traced
with every ResizeObserver callback logged per frame: picking a purpose
shrinks the Usage page from 100 rows, the click's hold (heldSizes in
app.js) gives the view room again before the paint, and the view's 8px
scrollbar coming back narrows #view-usage 1068 → 1060, so #ledWrap,
#ledChart, table.led and the Usage head are told a second time in the
same frame, past the loop's depth. The browser delivers that round on the
next frame; nothing is painted wrong. WebKit reports it as a page error,
Chromium doesn't. The test now ignores that one message, with the reason
beside it.

Eight WebKit copies at once: before, 1 to 3 of 6–8 failed with it; after,
16 of 16 pass.
This commit is contained in:
yetone
2026-10-08 03:05:33 +08:00
parent 796221279f
commit 75aa03e1a2
+8 -1
View File
@@ -85,7 +85,14 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
const page = await context.newPage();
page.setDefaultTimeout(7000);
const errors = [], asked = [];
page.on("pageerror", (e) => errors.push(e.message));
// WebKit reports a ResizeObserver round left to the next frame as a page
// error; Chromium doesn't. A purpose picked from a long list shrinks the
// Usage page, the click's hold (heldSizes) gives it room again before the
// paint, and the page's scrollbar coming back narrows the ledger by 8px
// in that same frame, so its own observers are told once more. Under
// load that lands past the loop's depth. Nothing is lost or painted
// wrong: the round is delivered on the next frame.
page.on("pageerror", (e) => { if (!/^ResizeObserver loop completed with undelivered notifications/.test(e.message)) errors.push(e.message); });
await page.route("**/*", server(lang, asked));
const choose = async (id, value) => {
await click(page, page.locator(id));