From 3d320035b62595c13c21ecd36d88d5f40622bb5a Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Fri, 6 Nov 2026 22:16:32 -0800 Subject: [PATCH] Wait for the holds check's flight by the clock, not a frame count A page's frames come at the display's rate: at 240 Hz the 20 frames the check allowed pass inside the 100 ms flight, and it failed on 'the flight ended'. It now waits up to a second by the harness clock, still capped at 600 frames, as the moveEnd check does. --- src/render/conformance/checks/camera.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/render/conformance/checks/camera.js b/src/render/conformance/checks/camera.js index 72f34fcc1..202958f43 100644 --- a/src/render/conformance/checks/camera.js +++ b/src/render/conformance/checks/camera.js @@ -222,7 +222,15 @@ export function cameraChecks() { const release = r.input.suspendCameraControls('drag'); ok(!r.camera.controls.enabled, 'a hold disables input'); r.camera.flyTo({ lon: 0, lat: 0, height: 1e6 }, { durationS: 0.1 }); - for (let i = 0; i < 20 && r.camera.flying; i++) await h.frame(r); + // By the clock, not a frame count: a page's frames come at the + // display's rate, so 20 of them can pass inside the 100 ms flight. + const flownAt = h.now(r); + for ( + let i = 0; + i < 600 && r.camera.flying && h.now(r) - flownAt < 1000; + i++ + ) + await h.frame(r); ok(!r.camera.flying, 'the flight ended'); ok(!r.camera.controls.enabled, 'the drag hold survives the flight end'); const second = r.camera.controls.suspend('cockpit');