Add pause action for key and pointer source types #20154
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In Webdriver spec, it has an example:
https://www.w3.org/TR/webdriver/#example-11
that the source has a pause action, which means that the
source does not have any action at this tick. Currently we only have
a pause action for none source type, we should have the pause action
for the key and pointer types as well as per web driver spec:
https://www.w3.org/TR/webdriver/#dfn-pause
For example:
let actions = new test_driver.Actions()
.addPointer("touchPointer1", "touch")
.addPointer("touchPointer2", "touch")
.pointerMove(10, 0, {origin: test1, sourceName: "touchPointer2"})
.pointerMove(0, 0, {origin: test1, sourceName: "touchPointer1"})
.pointerDown({sourceName: "touchPointer1"})
.pointerDown({sourceName: "touchPointer2"})
.pause(0, "pointer", {sourceName: "touchPointer1"})
.pointerMove(0, 10, {origin: test1, sourceName: "touchPointer2"})
.pointerUp({sourceName: "touchPointer1"})
.pointerUp({sourceName: "touchPointer2"});
Bug: 1020674
Change-Id: Iacd2811a91bc26d273cd9589a96e0a377941d79c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1900650
Reviewed-by: Navid Zolghadr <nzolghadr@chromium.org>
Reviewed-by: Lan Wei <lanwei@chromium.org>
Commit-Queue: Lan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714370}