Open Bug 1622346 Opened 5 years ago Updated 4 years ago

Intermittent focus/the-autofocus-attribute/first-when-later-but-before.html.ini WPT FAIL

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P3)

defect

Tracking

()

Tracking Status
firefox76 --- affected

People

(Reporter: cpeterson, Unassigned)

References

Details

Component: DOM: Core & HTML → DOM: UI Events & Focus Handling
Priority: -- → P3

The DOM Fission team is relying on feature teams to debug and fix Fission failures in their tests. If the failure looks like a bug in Fission's DOM or IPC changes, you can send the bug back to me.

We're hoping to enable Fission for a subset of Nightly users in early Q3, so we would like WPT tests to be green for Fission by end of Q2. Whether a particular test failure actually blocks shipping Fission is up to the discretion of the feature team. You all would know better than the DOM Fission which test failures are most important.

You can enable Fission when running WPT tests locally using mach wpt --enable-fission.

Hi Henri, please help us to understand the importance and priority of this if you see fit. Thank you.

Flags: needinfo?(hsivonen)

It's bad to have something that fails depending on timing (probably depends on the relative order of the content process believing it that it is OK for it to take focus and the code that tries to take focus running). However, the user impact is minimal, and since we have bigger problems with Fission focus right now, I think this is practically P3, but we should do a retriage round of the various test failures when the bigger problems have been dealt with, and I'd expect to upgrade this in such a later triage round.

As far as I can tell, this isn't a test bug but an actual Gecko bug. We'll probably want to make the autofocus triggering code ask the focus manager if we're in a state where focus can be taken and post a runnable to retry on the next event loop spin if not. That's not a great solution, and I'd welcome better ideas. Also, it would be super-nice to see this in Pernosco, which would require a Linux repro.

Flags: needinfo?(hsivonen)

Tracking WPT Fission bugs for Fission M6b (Q2)

Fission Milestone: M6 → M6b

Because this bug's Severity has not been changed from the default since it was filed, and it's Priority is P3 (Backlog,) indicating it has been triaged, the bug's Severity is being updated to S3 (normal.)

Severity: normal → S3

This test still fails intermittently for Fission on Windows, but it also fails intermittently for non-Fission on Linux and Android.

https://searchfox.org/mozilla-central/rev/35b97af64a55d1d30caa4d6e9fabc1a7fbabc509/testing/web-platform/meta/html/interaction/focus/the-autofocus-attribute/first-when-later-but-before.html.ini

    expected:
      if (os == "win") and fission: ["PASS", "FAIL"]
      if (os == "linux") and not debug: ["PASS", "FAIL"]
      if (os == "android") and not debug: ["PASS", "FAIL"]
Fission Milestone: M6b → M7

Henri, can you please re-evaluate this failure for Fission Nightly experiments?

Fission Milestone: M7 → M6c
Flags: needinfo?(hsivonen)
Flags: needinfo?(hsivonen)
See Also: → 1646488

Oops. I didn't mean to clear the needinfo yet.

Flags: needinfo?(hsivonen)
Assignee: nobody → hsivonen
Status: NEW → ASSIGNED

The test relies on this:

// If an element with autofocus is connected to a document and this function
// is called, the autofocus result is deterministic after returning from the
// function.
// Exception: If the document has script-blocking style sheets, this function
// doesn't work well.
async function waitUntilStableAutofocusState(w) {
  let targetWindow = w || window;
  // Awaiting one animation frame is an easy way to determine autofocus state.
  await waitForAnimationFrame(targetWindow);
}

It's unclear to me if Gecko makes any guarantees that the above should work.

Where waitForAnimationFrame is:

function waitForAnimationFrame(w) {
  let targetWindow = w || window;
  return new Promise((resolve, reject) => {
    targetWindow.requestAnimationFrame(resolve);
  });
}

Per Emilio on Matrix, we don't make the requestAnimationFrame guarantee that this test expects a guaranteed that we don't make. We already have non-Fission expectation annotations for this test, and the Fission annotations are just a matter of Fission perturbing the timing of the non-guarantee.

Neha, I think it doesn't make sense to treat this as a Fission bug. Is it OK to stop tracking this for Fission?

https://wpt.fyi/results/html/interaction/focus/the-autofocus-attribute/first-when-later-but-before.html?label=master&label=experimental&aligned&q=focus%2Fthe-autofocus-attribute%2Ffirst-when-later-but-before.html shows Safari passing the test, but it also shows us passing the test.

Flags: needinfo?(hsivonen) → needinfo?(nkochar)

Yeah seems like we should move the autofocus code to somewhere after flushing in nsRefreshDriver::Tick or such.

Untracking for Fission per comment 11.

Fission Milestone: M6c → ---
Flags: needinfo?(nkochar)

Removing "with Fission" because this test failure is not Fission-specific.

Summary: Intermittent focus/the-autofocus-attribute/first-when-later-but-before.html.ini WPT FAIL with Fission → Intermittent focus/the-autofocus-attribute/first-when-later-but-before.html.ini WPT FAIL

Unblocking WPT-Fis meta bug 1586790 because this test failure is not Fission-specific.

No longer blocks: WPT-Fis
Assignee: hsivonen → nobody
Status: ASSIGNED → NEW
You need to log in before you can comment on or make changes to this bug.