Closed Bug 1832725 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 39977 - Fix flaky collapse-pre-linestart-1.html test

Categories

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

task

Tracking

()

RESOLVED FIXED
115 Branch
Tracking Status
firefox115 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Sanket Joshi <sajos@microsoft.com> wrote:

Fix flaky collapse-pre-linestart-1.html test

The above test is flaky due to the editable region not having focus on
occasion, leading to differences with the expected test baseline, which
does have focus. The test ref explicitly calls .focus() to focus the
editable region, which guarantees the presence of the focus ring prior
to test completion. The actual test does not call .focus(), which means
there could be a race between the browser establishing focus and test
execution completing. To fix this, the collapse-pre-linestart-1.html
test is being updated to call .focus() on the editable region.

The same pattern is observed in collapse-pre-linestart-2.html, thus
that test is also being updated herewith.

Bug: 1296445
Change-Id: Ib6fda1c538a8056557ed87a90993ba08c3951c05
Reviewed-on: https://chromium-review.googlesource.com/4525099
WPT-Export-Revision: 2f02ced7970c780527b8d52aa25f9ee4aae166d7

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

CI Results

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

Total 2 tests

Status Summary

Firefox

PASS: 2

Chrome

PASS: 2

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8b8dd1efdfa9 [wpt PR 39977] - Fix flaky collapse-pre-linestart-1.html test, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch
You need to log in before you can comment on or make changes to this bug.