Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make all clipboard events composed by default. #62

Merged
merged 1 commit into from
Feb 16, 2018

Conversation

TakayoshiKochi
Copy link
Member

This resolves #61

@TakayoshiKochi
Copy link
Member Author

Please hold on reviewing until #61 concludes.

@garykac
Copy link
Member

garykac commented Feb 15, 2018

Can you make these edits to the index.bs file instead of the HTML file?
The .HTML file is auto-generated from the .BS file, so they'll be overwritten if we edit the HTML file directly.

Update index.bs instead of index.html.
This resolves w3c#61
@TakayoshiKochi
Copy link
Member Author

Done. Could you take another look?

@garykac garykac merged commit d7eecc3 into w3c:master Feb 16, 2018
@TakayoshiKochi TakayoshiKochi deleted the composed branch February 22, 2018 07:03
foolip added a commit to web-platform-tests/wpt that referenced this pull request Feb 22, 2018
Follows w3c/clipboard-apis#62.

Per manual testing, this fails in Chrome and Firefox because the event
is not compose, but passes in Safari. Edge not tested.
@foolip
Copy link
Member

foolip commented Feb 22, 2018

Hi all,

This quarter @rakuco and I have been looking into a normative spec change without tests to help us understand how testing in standards is working out in practice, and where there's more infrastructure work needed to make it practical.

This week I ended up here, and I think #58 and 11619a7 (no PR?) might also be testable, but less obviously so.

It looks like there weren't any tests for any events at all in https://github.com/w3c/web-platform-tests/tree/master/clipboard-apis, presumably because they'd have to be manual. To convince myself it's possible, I wrote a manual test that exercises this change:
web-platform-tests/wpt#9626 (review appreciated)

Question for everyone here: what automation bits would you need in https://w3c.github.io/webdriver/webdriver-spec.html and exposed in http://web-platform-tests.org/writing-tests/testdriver.html to be able to reliably test changes to this spec? If you could file an issue on the web-platform-tests repo and add the type:untestable label, that'd be much appreciated.

In the meantime, do you think that writing manual tests is worthwhile? Is there any useful advice that should go in https://github.com/w3c/clipboard-apis/blob/master/CONTRIBUTING.md#tests?

@TakayoshiKochi
Copy link
Member Author

Thanks @foolip for catching this.

As you imagined, this needs a manual test (could be automated by test driver?) and I was thinking of writing some tests while I'm changing the implementation in Blink - and you went ahead of me :)

I thought we can do document.execCommand('copy'), but turned out using execCommand() is not reliable :(

@TakayoshiKochi
Copy link
Member Author

foolip added a commit to web-platform-tests/wpt that referenced this pull request Feb 23, 2018
foolip added a commit to web-platform-tests/wpt that referenced this pull request Feb 23, 2018
@foolip
Copy link
Member

foolip commented Feb 23, 2018

@kereliuk, do you have an update on testdriver.js support for keyboard input? I think that could be used to copy-paste, although it'd assume something about the key combinations that do it on various platforms. With that these tests should be possible to automate.

My follow-up question is whether it is generally true that changes in the Clipboard API spec get tests from implementations shortly thereafter? In that case it seems like a very good place to be. But I wonder how often things fall through the cracks, so that spec changes are made but no implementer ever follows, and it takes years before anyone notices?

@kereliuk
Copy link

Working on the keyboard input/direct WebDriver now, should have a PR up soon.

There has been discussion about adding some sort of spec support for clipboard stuff in WebDriver like copy and paste and not just have it as using the keyboard, (notably at TPAC last year). But not much of a consensus was reached and it becomes tricky if we want to use the system clipboard especially in the case where there are multiple sessions running at the same time which is common.

@foolip
Copy link
Member

foolip commented Feb 24, 2018

I guess we could put copy/paste/cut with keyboard in testdriver.js and implement using WebDriver, so that it can be overridden on platforms where the keyboard shortcuts aren't the same.

We really can't get around the fact that the clipboard is global I think, at most we could try to warn about it somewhere.

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Feb 28, 2018
This corresponds to the upstream spec change on
w3c/clipboard-apis#62

Note that synthetic events are not affected by the change.

To generate copy/cut/paste events, document.execCommand() is
used for Blink, but cannot be used for web platform tests.

Bug: 802009
Change-Id: I00df77269708458b9a6820323a1f511b7c75e513
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 1, 2018
This corresponds to the upstream spec change on
w3c/clipboard-apis#62

Note that synthetic events are not affected by the change.

To generate copy/cut/paste events, document.execCommand() is
used for Blink, but cannot be used for web platform tests.

Bug: 802009
Change-Id: I00df77269708458b9a6820323a1f511b7c75e513
aarongable pushed a commit to chromium/chromium that referenced this pull request Mar 1, 2018
This corresponds to the upstream spec change on
w3c/clipboard-apis#62

Note that synthetic events are not affected by the change.

To generate copy/cut/paste events, document.execCommand() is
used for Blink, but cannot be used for web platform tests.

Bug: 802009
Change-Id: I00df77269708458b9a6820323a1f511b7c75e513
Reviewed-on: https://chromium-review.googlesource.com/923671
Reviewed-by: Hayato Ito <hayato@chromium.org>
Reviewed-by: Gary Kacmarcik <garykac@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Takayoshi Kochi <kochi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540046}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 1, 2018
This corresponds to the upstream spec change on
w3c/clipboard-apis#62

Note that synthetic events are not affected by the change.

To generate copy/cut/paste events, document.execCommand() is
used for Blink, but cannot be used for web platform tests.

Bug: 802009
Change-Id: I00df77269708458b9a6820323a1f511b7c75e513
Reviewed-on: https://chromium-review.googlesource.com/923671
Reviewed-by: Hayato Ito <hayato@chromium.org>
Reviewed-by: Gary Kacmarcik <garykac@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Takayoshi Kochi <kochi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540046}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 1, 2018
This corresponds to the upstream spec change on
w3c/clipboard-apis#62

Note that synthetic events are not affected by the change.

To generate copy/cut/paste events, document.execCommand() is
used for Blink, but cannot be used for web platform tests.

Bug: 802009
Change-Id: I00df77269708458b9a6820323a1f511b7c75e513
Reviewed-on: https://chromium-review.googlesource.com/923671
Reviewed-by: Hayato Ito <hayato@chromium.org>
Reviewed-by: Gary Kacmarcik <garykac@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Takayoshi Kochi <kochi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540046}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Apr 1, 2018
…ste events, a=testonly

Automatic update from web-platform-testsAdd manual tests for the copy, cut and paste events

Follows w3c/clipboard-apis#62.

wpt-commits: ae0deb719db81d191fe169b8c3ab4d341da8ac1b
wpt-pr: 9626
wpt-commits: ae0deb719db81d191fe169b8c3ab4d341da8ac1b
wpt-pr: 9626
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Apr 1, 2018
Automatic update from web-platform-testsMake clipboard events composed.

This corresponds to the upstream spec change on
w3c/clipboard-apis#62

Note that synthetic events are not affected by the change.

To generate copy/cut/paste events, document.execCommand() is
used for Blink, but cannot be used for web platform tests.

Bug: 802009
Change-Id: I00df77269708458b9a6820323a1f511b7c75e513
Reviewed-on: https://chromium-review.googlesource.com/923671
Reviewed-by: Hayato Ito <hayato@chromium.org>
Reviewed-by: Gary Kacmarcik <garykac@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Takayoshi Kochi <kochi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540046}

wpt-commits: 8dbff770ac61468d23313ad7ccb00ba6e2880064
wpt-pr: 9710
wpt-commits: 8dbff770ac61468d23313ad7ccb00ba6e2880064
wpt-pr: 9710
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 2, 2019
…ste events, a=testonly

Automatic update from web-platform-testsAdd manual tests for the copy, cut and paste events

Follows w3c/clipboard-apis#62.

wpt-commits: ae0deb719db81d191fe169b8c3ab4d341da8ac1b
wpt-pr: 9626
wpt-commits: ae0deb719db81d191fe169b8c3ab4d341da8ac1b
wpt-pr: 9626

UltraBlame original commit: 0039b7742ee55143beaf1da815628998cac7c22f
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 2, 2019
Automatic update from web-platform-testsMake clipboard events composed.

This corresponds to the upstream spec change on
w3c/clipboard-apis#62

Note that synthetic events are not affected by the change.

To generate copy/cut/paste events, document.execCommand() is
used for Blink, but cannot be used for web platform tests.

Bug: 802009
Change-Id: I00df77269708458b9a6820323a1f511b7c75e513
Reviewed-on: https://chromium-review.googlesource.com/923671
Reviewed-by: Hayato Ito <hayatochromium.org>
Reviewed-by: Gary Kacmarcik <garykacchromium.org>
Reviewed-by: Yoshifumi Inoue <yosinchromium.org>
Commit-Queue: Takayoshi Kochi <kochichromium.org>
Cr-Commit-Position: refs/heads/master{#540046}

wpt-commits: 8dbff770ac61468d23313ad7ccb00ba6e2880064
wpt-pr: 9710
wpt-commits: 8dbff770ac61468d23313ad7ccb00ba6e2880064
wpt-pr: 9710

UltraBlame original commit: 8cd00834924cc5823be42879a67349c2eb7746e1
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 2, 2019
…ste events, a=testonly

Automatic update from web-platform-testsAdd manual tests for the copy, cut and paste events

Follows w3c/clipboard-apis#62.

wpt-commits: ae0deb719db81d191fe169b8c3ab4d341da8ac1b
wpt-pr: 9626
wpt-commits: ae0deb719db81d191fe169b8c3ab4d341da8ac1b
wpt-pr: 9626

UltraBlame original commit: 0039b7742ee55143beaf1da815628998cac7c22f
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 2, 2019
Automatic update from web-platform-testsMake clipboard events composed.

This corresponds to the upstream spec change on
w3c/clipboard-apis#62

Note that synthetic events are not affected by the change.

To generate copy/cut/paste events, document.execCommand() is
used for Blink, but cannot be used for web platform tests.

Bug: 802009
Change-Id: I00df77269708458b9a6820323a1f511b7c75e513
Reviewed-on: https://chromium-review.googlesource.com/923671
Reviewed-by: Hayato Ito <hayatochromium.org>
Reviewed-by: Gary Kacmarcik <garykacchromium.org>
Reviewed-by: Yoshifumi Inoue <yosinchromium.org>
Commit-Queue: Takayoshi Kochi <kochichromium.org>
Cr-Commit-Position: refs/heads/master{#540046}

wpt-commits: 8dbff770ac61468d23313ad7ccb00ba6e2880064
wpt-pr: 9710
wpt-commits: 8dbff770ac61468d23313ad7ccb00ba6e2880064
wpt-pr: 9710

UltraBlame original commit: 8cd00834924cc5823be42879a67349c2eb7746e1
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 2, 2019
…ste events, a=testonly

Automatic update from web-platform-testsAdd manual tests for the copy, cut and paste events

Follows w3c/clipboard-apis#62.

wpt-commits: ae0deb719db81d191fe169b8c3ab4d341da8ac1b
wpt-pr: 9626
wpt-commits: ae0deb719db81d191fe169b8c3ab4d341da8ac1b
wpt-pr: 9626

UltraBlame original commit: 0039b7742ee55143beaf1da815628998cac7c22f
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 2, 2019
Automatic update from web-platform-testsMake clipboard events composed.

This corresponds to the upstream spec change on
w3c/clipboard-apis#62

Note that synthetic events are not affected by the change.

To generate copy/cut/paste events, document.execCommand() is
used for Blink, but cannot be used for web platform tests.

Bug: 802009
Change-Id: I00df77269708458b9a6820323a1f511b7c75e513
Reviewed-on: https://chromium-review.googlesource.com/923671
Reviewed-by: Hayato Ito <hayatochromium.org>
Reviewed-by: Gary Kacmarcik <garykacchromium.org>
Reviewed-by: Yoshifumi Inoue <yosinchromium.org>
Commit-Queue: Takayoshi Kochi <kochichromium.org>
Cr-Commit-Position: refs/heads/master{#540046}

wpt-commits: 8dbff770ac61468d23313ad7ccb00ba6e2880064
wpt-pr: 9710
wpt-commits: 8dbff770ac61468d23313ad7ccb00ba6e2880064
wpt-pr: 9710

UltraBlame original commit: 8cd00834924cc5823be42879a67349c2eb7746e1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Define each event type is composed or not, update the spec
4 participants