From 75aa03e1a29692e7bc140b967b4d7e516c124ca4 Mon Sep 17 00:00:00 2001 From: yetone Date: Wed, 7 Oct 2026 19:25:33 +0800 Subject: [PATCH] gui tests: purpose-filter doesn't count WebKit's "ResizeObserver loop completed with undelivered notifications" as a page error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- internal/gui/tests/purpose-filter.test.cjs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/internal/gui/tests/purpose-filter.test.cjs b/internal/gui/tests/purpose-filter.test.cjs index 003b39be3..36e4af6e2 100644 --- a/internal/gui/tests/purpose-filter.test.cjs +++ b/internal/gui/tests/purpose-filter.test.cjs @@ -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));