test: fix RuntimeWarnings in multi-tab concurrency test

This commit is contained in:
liumangmang
2026-05-30 10:21:30 +08:00
parent 18c04c1f86
commit 890432e1a5
+2
View File
@@ -172,6 +172,8 @@ async def test_session_state_concurrency_with_popup(service, session):
new_page = AsyncMock()
new_page.on = MagicMock()
new_page.is_closed = MagicMock(return_value=False)
new_page.url = "https://new.test"
new_page.bring_to_front = AsyncMock()
service._handle_new_page(session, new_page)
# Yield to let the registration task start (it will block on the lock)
await asyncio.sleep(0.01)