Closed Bug 2078029 Opened 1 month ago Closed 1 month ago

[wpt-sync] Sync PR 63256 - [wpt] Deflake bidi/browsing_context/user_prompt_opened/beforeunload.py

Categories

(Remote Protocol :: WebDriver BiDi, task, P4)

task

Tracking

(firefox160 fixed)

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 63256 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/63256
Details from upstream follow.

Mike Taylor <miketaylr@chromium.org> wrote:

[wpt] Deflake bidi/browsing_context/user_prompt_opened/beforeunload.py

The test cancelled the pending browsingContext.navigate task after
receiving userPromptOpened. Since beforeunload prompts are accepted by
default, the navigation can still succeed before the tab is closed in
the new_tab fixture teardown. In that case the WPT BiDi client calls
set_result() on the cancelled future, which raises InvalidStateError
and terminates the websocket reader task, so the browsingContext.close
response is never processed and the test hangs until the harness
timeout.

Await the navigation instead so that no command is pending at teardown.
Locally this went from ~4/25 timeouts to 0/40.

Bug: 565888355, 568343392
Change-Id: If705703539cb8b1be6c7ee4faa1ae63d3486189d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8512617
Commit-Queue: Ari Chivukula \<arichiv@chromium.org>
Reviewed-by: Ari Chivukula \<arichiv@chromium.org>
Auto-Submit: Mike Taylor \<miketaylr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1710925}

Component: web-platform-tests → WebDriver BiDi
Product: Testing → Remote Protocol

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 4 tests and 12 subtests

Status Summary

Firefox

OK : 1[GitHub] 4[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS : 1[GitHub] 18[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 20[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]

Chrome

OK : 1
PASS : 1

Safari

TIMEOUT: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch
You need to log in before you can comment on or make changes to this bug.