web-platform-tests / web-platform-tests/rfcs

Initial focus assumption for tests

Open
#231 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
110
Forks
90
PR merge metrics
No merged PRs in 30d

Description

https://github.com/web-platform-tests/wpt/commit/bef892c489 replaced window.open() + polling for opening testharness windows with the WebDriver "New Window" command, which doesn't run focusing steps. This inadvertently broke tests that implicitly relied on initial focus, such as:

I think we should clarify and maybe document what (if any) initial focus target WPT guarantees. If we decide not to guarantee anything, each test will need to set up its own initial focus target.

As a point of comparison, the Marionette testharness implementation currently provides focus=True, which means "the opened window will be focused" (similar to the pre-bef892c489 WebDriver behavior).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked WebDriver New Window change, the assumptions documentation at web-platform-tests.org/writing-tests/assumptions.html, and the Marionette testharness implementation referenced in the issue. Compare the affected focus-dependent tests and determine whether WPT guarantees an initial focus target or requires each test to establish one. Done means the policy is decided and clearly documented, with affected tests aligned to that decision.

Written by the indexing model from the issue text.

Assessment

Domain
documentation, testing
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.