Skip to content

test: wait for navigation to settle in loadURL tests - #51643

Merged
ckerr merged 1 commit into
43-x-yfrom
trop/43-x-y-bp-test-wait-for-navigation-to-settle-in-loadurl-tests-1778857338549
May 15, 2026
Merged

ckerr merged 1 commit into
43-x-yfrom
trop/43-x-y-bp-test-wait-for-navigation-to-settle-in-loadurl-tests-1778857338549

Conversation

@trop

@trop trop Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

Backport of #51579

See that PR for details.

Notes: none

The three reentrant loadURL tests could call done() while the primary
navigation was still in-flight. When the reentrant loadURL call is
rejected by the guard in WebContents::LoadURL(), it emits did-fail-load
synchronously. If the test exits on did-fail-load alone, the afterEach()
call to closeAllWindows() can destroy the window while that primary
navigation still has in-flight events.

Fix by using Promise.all() to wait for both did-fail-load and
did-stop-loading before the test exits, ensuring the primary navigation
has fully settled. The tests are also converted from done-callback style
to async/await for clarity.

Co-authored-by: GitHub Copilot <[email protected]>

Co-authored-by: Charles Kerr <[email protected]>
@trop
trop Bot requested a review from ckerr May 15, 2026 15:02
@trop trop Bot added 43-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels May 15, 2026
@ckerr
ckerr merged commit 1b655b3 into 43-x-y May 15, 2026
79 checks passed
@ckerr
ckerr deleted the trop/43-x-y-bp-test-wait-for-navigation-to-settle-in-loadurl-tests-1778857338549 branch May 15, 2026 18:06
@release-clerk

release-clerk Bot commented May 15, 2026

Copy link
Copy Markdown

No Release Notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

43-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant