-
Notifications
You must be signed in to change notification settings - Fork 36
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
Conversation
Please hold on reviewing until #61 concludes. |
Can you make these edits to the |
Update index.bs instead of index.html. This resolves w3c#61
ae279f7
to
6257470
Compare
Done. Could you take another look? |
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.
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: 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? |
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 :( |
FYI, this is my wip CL |
@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? |
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. |
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. |
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
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
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}
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}
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}
…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
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
…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
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
…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
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
…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
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
This resolves #61