tests: give the positive waits of test_service_worker_controller_e2e the suite's 30 s deadline

A deadline under 30 s on a wait for something that must happen judges the runner, not the product; the assertions are untouched.
This commit is contained in:
feder-cr committed 2026-11-16 02:39:13 +01:00
1 parent 763e086e4f
commit 5f5222d754
1 file changed
+3 -3
+3 -3
View File
@@ -24,10 +24,10 @@ def test_a_reloaded_page_is_controlled_by_its_service_worker(firefox_binary, fix
if routed:
ctx.route("**/*", lambda route: route.continue_())
page = ctx.new_page()
page.goto(f"{fixture_server}/", timeout=15_000)
page.wait_for_function("window.__swState === 'registered'", timeout=10_000)
page.goto(f"{fixture_server}/", timeout=30_000)
page.wait_for_function("window.__swState === 'registered'", timeout=30_000)
page.evaluate("navigator.serviceWorker.ready.then(() => true)")
page.reload(timeout=15_000)
page.reload(timeout=30_000)
# until the worker has taken the page (a condition with a deadline, not 500 ms); a page that never gets a
# controller (the defect above) still ends here, red, at the deadline
wait_until(lambda: page.evaluate("navigator.serviceWorker.controller !== null"), 30,