You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 882675d
Browse filesBrowse the repository at this point in the historyBrowse files
Larry
committed
Replace fixed browser-test waits with conditions, gates and the clock
Ten page.waitForTimeout calls made tests depend on runner speed. Each is
replaced by the evidence the wait stood in for:
- avatar-loading: an on-screen lazy sentinel image is requested only after
the browser has evaluated lazy loading, so the offscreen avatar check has
a completion barrier.
- image-scroll: an IntersectionObserver created after the product's fires
its first callback after the product's, so the "no offscreen paint" check
follows the product's visibility decision.
- history-loading: each wheel step waits until it scrolls or requests the
older page.
- layout: page.clock expires Virtua's 150ms scroll timer exactly.
- navigation-groups: the frame-count barrier already samples the held
decode; the extra 300ms added nothing.
- sidebar-unread: wait until both revealed rows are prepared before
checking for repeated reads.
- thread-unread: page.clock runs the 750ms reading dwell; the own-reply
check waits until the session has indexed the reply as ineligible.
A Biome plugin (tests/browser/fixed-sleeps.grit) now rejects
waitForTimeout anywhere in the repository.
Checks: for the avatar and image barriers, making the product eager fails
the test in both engines. The changed tests pass 4/4 repeats in chromium
and webkit.
Signed-off-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
// A fixed wait is not a synchronization primitive. Wait for an observable
4
+
// condition, hold the operation with a gate, or control the clock
5
+
// (page.clock). See AGENTS.md "Deterministic tests".
6
+
`$page.waitForTimeout($ms)` where {
7
+
register_diagnostic(span=$ms, message="Do not wait a fixed time. Wait for a condition, hold the work with a gate, or use page.clock.", severity="error")
0 commit comments