Commit fd07ecb
unittests: fix main_test shutdown on macOS
The main_test hardening added a pre-Shutdown wait for
GetBrowserByIdentifier(MAIN_BROWSER_ID) to return None. All five macOS jobs
timed out there even though the JavaScript, popup, DevTools and handler
callbacks had completed.
CloseBrowser(True) starts an asynchronous native close and does not guarantee
that a synchronously created macOS browser reaches OnBeforeClose before
Shutdown. This matches upstream CEF issues chromiumembedded/cef#3469 and
chromiumembedded/cef#3810. cefpython removes the browser from its registry in
OnBeforeClose, so registry disappearance is not a portable pre-Shutdown
condition.
Remove only that close wait and restore the existing 25-iteration
MessageLoopWork grace period. Keep the condition-driven pre-close completion
gate that fixes the original Windows Python 3.14 timing failure, and let
cef.Shutdown() perform its existing final browser cleanup.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 887dc7a commit fd07ecb
1 file changed
Lines changed: 4 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
339 | 334 | | |
340 | 335 | | |
341 | 336 | | |
| |||
0 commit comments