From ab83ad3c58044e9dde9cb6653e9ebab9c3dec950 Mon Sep 17 00:00:00 2001 From: Steffen Becker Date: Mon, 10 Aug 2026 11:32:40 +0000 Subject: [PATCH] test: the parity runner compares a leader as one token, and polls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit How many dots fill a tab or index leader is the fill's own business — both engines end it at the same stop. The settle predicate now polls on a timer: walking every spacer and index row each frame starved the layout it was waiting for, and half the runs timed out. --- tests/render-parity/run.mjs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/render-parity/run.mjs b/tests/render-parity/run.mjs index 5738f09..e6e87f5 100644 --- a/tests/render-parity/run.mjs +++ b/tests/render-parity/run.mjs @@ -106,7 +106,9 @@ async function settle(page) { const w = window; if (w.__parityKey !== key) { w.__parityKey = key; w.__paritySince = performance.now(); return false; } return performance.now() - (w.__paritySince ?? 0) > 3000; - }, null, { timeout: 180_000 }); + // Polled, not per frame: the predicate walks every spacer and index row, and on a + // 60-page document doing that each frame starves the layout it is waiting for. + }, null, { timeout: 180_000, polling: 500 }); } // Runs in the browser: every rendered word with its page and mm position. @@ -236,8 +238,10 @@ function compare(ref, ed) { } // Whitespace-insensitive: spell decorations split text nodes mid-word and the two -// engines needn't agree on word boundaries — only on what sits on a line. -const norm = (s) => s.replace(/[\s\u00a0\u00ad]+/g, ''); +// engines needn't agree on word boundaries — only on what sits on a line. A tab or +// index leader collapses to one token too: how many dots fill the gap is the fill's +// own business, and both engines end it at the same stop. +const norm = (s) => s.replace(/[\s\u00a0\u00ad]+/g, '').replace(/([.\u00b7_-])\1{2,}/g, '\u2026'); // ------------------------------------------------------------------- driver