Skip to content

Commit 36228d0

Browse files
sideshowbarkergmta
authored andcommitted
Tests: Wait for reseed convergence after blocked-reload crash recovery
Problem: TestWebDriverSessionHistory regularly failed in CI jobs, predominantly on (slow/loaded) Sanitizer builds. Cause: After the crash recovery reloads the current entry, the test waited only for the WebContent-side reload_blocked_document_ran event, and then sampled reloadPending once. But reloadPending and the reseed flags clear on the UI only once WebContent’s load-complete IPC lands — which lags that event. On a slow or loaded build, the check ran before the IPC arrived — and failed while the reseed was still in flight. Fix: Wait for the reseed to converge (reloadPending and the seed and reseed flags all cleared) instead of sampling once — matching the wait- for-convergence pattern used elsewhere in the test.
1 parent 498acab commit 36228d0

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

Tests/LibWebView/test-webdriver-session-history.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5279,8 +5279,17 @@ def browser_ui_traverse_setup_is_mirrored(snapshot):
52795279
page_server.release_blocked_reload.set()
52805280
wait_for_event(page_server.reload_blocked_document_ran, "reload document after crash recovery")
52815281
expect_url(webdriver_port, session_id, "after blocked reload crash recovery", url_reload_blocked, log)
5282-
expect_current_ui_entry_reload_pending(
5283-
webdriver_port, session_id, "after blocked reload crash recovery", False, log
5282+
wait_for_session_history(
5283+
webdriver_port,
5284+
session_id,
5285+
"reload pending clears after blocked reload crash recovery",
5286+
lambda snapshot: (
5287+
not history_current_entry(snapshot["ui"])["reloadPending"]
5288+
and not snapshot["ui"]["waitingToSeedWebContent"]
5289+
and not snapshot["ui"]["waitingForWebContentSeedAck"]
5290+
and not snapshot["ui"]["reseedAfterCurrentHistoryLoad"]
5291+
),
5292+
log,
52845293
)
52855294

52865295
expect_cross_site_fragment_navigation_from_ui_loads_document(

0 commit comments

Comments
 (0)