Closed Bug 1840947 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 40789 - [execCommand] Fix regressionsn in `EditorTestUtils.sendKeys`

Categories

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

task

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Koji Ishii <kojii@chromium.org> wrote:

[execCommand] Fix regressionsn in EditorTestUtils.sendKeys

crrev.com/c/4639443 fixed some errors, while turning some
other errors to:
"Error: element send_keys intercepted error"
This error turned out to be deterministic by the DOM tree
structure in testdriver.js[1], broke tests in other
browsers at wpt.fyi[2].

This patch fixes this by catching errors in send_keys and
falling back to keyDown/keyUp. These tests still don't
work for Chromium due to crbug.com/893480 but they should
work for other browsers.

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/wpt_tools/wpt/resources/testdriver.js;l=302?q=%22element%20send_keys%20intercepted%20error%22%20f:.js&ss=chromium%2Fchromium%2Fsrc
[2] https://github.com/web-platform-tests/wpt/pull/40754#issuecomment-1610045693

Bug: 893480, 1420675
Change-Id: Ib07fe6d0d353b36f19a2bf46a3b8b0e76a48607e

Reviewed-on: https://chromium-review.googlesource.com/4654068
WPT-Export-Revision: c982aa7eb126c902857ed0ffabc70f4206d03109

PR 40789 applied with additional changes from upstream: 3451ed7d00d21f953ae2cc76d2cd911fe645388b
Component: web-platform-tests → DOM: Editor
Product: Testing → Core
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/11f16ecf9f6f [wpt PR 40789] - [execCommand] Fix regressionsn in `EditorTestUtils.sendKeys`, a=testonly
Test result changes from PR not available.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
You need to log in before you can comment on or make changes to this bug.