Closed Bug 2077698 Opened 1 month ago Closed 1 month ago

[wpt-sync] Sync PR 63220 - Ensure page has focus at the start of the test

Categories

(Core :: DOM: Navigation, task, P4)

task

Tracking

()

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Daniel Clark <daniec@microsoft.com> wrote:

Ensure page has focus at the start of the test

Ensure the page has focus at the start of navigation-api/focus-reset/change-focus-again-in-blur-during-intercept.html.

Per https://github.com/web-platform-tests/rfcs/issues/231 the harness no longer guarantees that a page has system focus at the start of a test. In Chromium, navigation-api/focus-reset/change-focus-again-in-blur-during-intercept.html depends on the page having focus because blur isn't fired if it doesn't.

Fix this by making testdriver click the document before the main test logic starts. This follows the example of https://github.com/web-platform-tests/wpt/pull/56270 which fixed this issue for other tests.

Component: web-platform-tests → DOM: Navigation
Product: Testing → Core

CI Results

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

Total 9 tests and 6 subtests

Status Summary

Firefox

OK : 1[GitHub] 9[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-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 1[GitHub] 34[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-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]

Chrome

OK : 1
PASS: 1

Safari

OK : 1
PASS: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0416ac34d829 https://hg.mozilla.org/integration/autoland/rev/60270777c5d9 [wpt PR 63220] - Ensure page has focus at the start of change-focus-again-in-blur-during-intercept.html, a=testonly
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.