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.
This commit is contained in:
dotCooCoo
2026-11-25 02:01:56 -08:00
parent 01c602dc40
commit 8f36898305
@@ -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);