Skip to content

Commit 4ce9951

Browse files
committed
osr_test: fix flaky OnAccessibilityLocationChange on Linux CI
Double the grace period from 3 s to 6 s and call WasResized() every ~1 s while waiting, so a stalled renderer IPC gets re-triggered rather than just timed out.
1 parent 97dd328 commit 4ce9951

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

unittests/osr_test.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,14 +186,16 @@ def test_osr(self):
186186
run_message_loop()
187187

188188
# OnAccessibilityLocationChange arrives via a separate renderer IPC and
189-
# can lag behind OnAccessibilityTreeChange on slow CI runners (e.g.
190-
# Python 3.14 adds enough overhead that 1 s was insufficient).
191-
# Poll in 100 ms batches, up to 3 extra seconds, and exit as soon as
192-
# the flag is set so fast runners pay nothing extra.
193-
for _ in range(30):
189+
# can lag behind OnAccessibilityTreeChange on slow CI runners.
190+
# Poll in 100 ms batches, up to 6 extra seconds. Every ~1 s also
191+
# call WasResized() so that a stalled renderer IPC gets re-triggered
192+
# rather than just waited out. Fast runners exit immediately.
193+
for i in range(60):
194194
if accessibility_handler._OnAccessibilityLocationChange_True:
195195
break
196196
do_message_loop_work(10)
197+
if i % 10 == 9:
198+
browser.WasResized()
197199

198200
# Close browser and clean reference
199201
browser.CloseBrowser(True)

0 commit comments

Comments
 (0)