Bug 1840448 [wpt PR 40754] - [execCommand] Use `send_keys` in `EditorTestUtils.sendKe...
commit0876ba60998d3efd9fcb17f5731b82610572a4c7
authorKoji Ishii <kojii@chromium.org>
Thu, 6 Jul 2023 16:20:14 +0000 (6 16:20 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Wed, 12 Jul 2023 07:53:24 +0000 (12 07:53 +0000)
treed3068454c981ebf057b17ff409a24deefc2ada1c
parent14628c94d466d5f63c5bf9622e7c5c044a5fde36
Bug 1840448 [wpt PR 40754] - [execCommand] Use `send_keys` in `EditorTestUtils.sendKeys`, a=testonly

Automatic update from web-platform-tests
[execCommand] Use `send_keys` in `EditorTestUtils.sendKeys`

As `keyDown`/`keyUp` aren't fully supported <crbug.com/893480>,
this patch changes `EditorTestUtils.sendKeys` to use
`send_keys` instead of `KeyDown`/`keyUp` when there are no
modifier keys.

In addition, this patch supports `0xE017` as `Delete` in
`test_driver_internal.send_keys`, as defined by "Keyboard
actions"[1] because the change above started to hit "Error:
No support for this code: U+e017".

This patch changes existing two errors in editing tests:
* "Error: We do not support keydown and keyup actions, please
  use test_driver.send_keys. See crbug.com/893480"
* "Error: can only send actions in top-level window"

to one of these:
* Pass.
* Failed to match expectations, probably actual failures.
* "Error: element send_keys intercepted error"

[1] https://w3c.github.io/webdriver/#keyboard-actions

Bug: 893480, 1420675
Change-Id: Ic5ecf8b2f11657f5714357e633705fc4d5c9ebd0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4639443
Auto-Submit: Koji Ishii <kojii@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1162610}

--

wpt-commits: 3451ed7d00d21f953ae2cc76d2cd911fe645388b
wpt-pr: 40754
testing/web-platform/tests/editing/include/editor-test-utils.js