From 94fee63cc15d8dd90b0fb9c0307cd4a39db645e2 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Tue, 17 Nov 2026 18:32:27 -0800 Subject: [PATCH] Fill Area: the large-document test presses while a hover search runs The pointer leaves the area to start a search on another thread before the press, so the test covers a click that waits for that search, and it checks that the press settles it. --- crates/engine/src/tests/fill_area.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/engine/src/tests/fill_area.rs b/crates/engine/src/tests/fill_area.rs index 98c5dc34db..aebf2323a4 100644 --- a/crates/engine/src/tests/fill_area.rs +++ b/crates/engine/src/tests/fill_area.rs @@ -497,10 +497,13 @@ fn fill_area_tool_hovers_a_large_document_on_another_thread() { s.pointer(&PointerEvent::new(PointerKind::Move, 300.0, 300.0), v).unwrap(); s.tool_poll(v, true).unwrap(); assert_eq!(s.overlays(v).len(), 1); - // A click while a search runs waits for it. - s.pointer(&PointerEvent::new(PointerKind::Move, 310.0, 300.0), v).unwrap(); + // A click while a search runs waits for it: the pointer leaves the area, which starts a + // search, and the press inside the area comes before any poll. + s.pointer(&PointerEvent::new(PointerKind::Move, 500.0, 500.0), v).unwrap(); + assert!(s.tool_waiting()); let undo = undo_len(&s); s.pointer(&PointerEvent::new(PointerKind::Down, 310.0, 300.0), v).unwrap(); + assert!(!s.tool_waiting(), "the press waited for the search"); s.pointer(&PointerEvent::new(PointerKind::Up, 310.0, 300.0), v).unwrap(); assert_eq!(undo_len(&s), undo + 1); }