From 8f3689830588ec2572b617e9f40b738364ee49aa Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 25 Nov 2026 02:01:56 -0800 Subject: [PATCH] Tests: two clicks in one frame isolate in the frame that takes the second release review_597048_two_ordinary_clicks_in_one_frame_survive_sampler_correction sends press, release, press, release in one frame. The framework gives a pass one press, so the second press reaches the canvas in the next frame and its release waits one frame more; the framework asks for a repaint for it. Since a frame runs its UI once (#9276), no second pass of the same frame ends that release, so the trial checked isolation one frame early. It now runs the frame the host would run before it checks, as the double-click trials in canvas/tests.rs do since #9276. --- crates/ui-egui/tests/image_trace_ignore_sampler.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/ui-egui/tests/image_trace_ignore_sampler.rs b/crates/ui-egui/tests/image_trace_ignore_sampler.rs index 75a3241ec6..9d8aefd246 100644 --- a/crates/ui-egui/tests/image_trace_ignore_sampler.rs +++ b/crates/ui-egui/tests/image_trace_ignore_sampler.rs @@ -1470,6 +1470,8 @@ fn review_597048_coalesced_pair(sampler_prefix: bool) { ); assert!(frame_event(&ctx, |i| i.pointer.button_double_clicked(PointerButton::Primary))); assert_eq!(frame_event(&ctx, |i| i.pointer.button_triple_clicked(PointerButton::Primary)), sampler_prefix); + // The canvas gets the second release in the frame after the second press, which the framework asks for. + frame_at(&mut app, &ctx, start + 3.0 * step, vec![]); assert_eq!(app.session.active().unwrap().isolation, Some(group), "two ordinary clicks isolate after an earlier-frame prefix"); app.run("object.exitIsolation", json!({"all": true})).unwrap(); review_gesture_press(&mut app, &ctx, at, start + 5.0 * step);