-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Added constructor tests for Touch and TouchEvent #2299
Added constructor tests for Touch and TouchEvent #2299
Conversation
Critic review: https://critic.hoppipolla.co.uk/r/5930 This is an external review system which you may optionally use for the code review of your pull request. In order to help critic track your changes, please do not make in-place history rewrites (e.g. via |
Thanks for doing this! Just a couple small concerns. I've actually never contributed directly to web-platform-test before (I worked on these tests when they were hosted directly in the webevents repository), so I'm not completely sure what the process is. Looks like there's some information here. Please send a note to public-touchevents mentioning this pull request (pull requests to the touchevents repo automatically generate a message to the list, but this is different) so that anyone else in the group can take a look. I think we should land the feature in blink and verify these tests pass in Chrome Canary before landing the new tests. |
Actually my comment on the issue should be sufficient (looks like all issue comments get copied to the list). |
This issue is also logged as w3c/touch-events#27 |
To get these merged someone needs to review them. @RByers - are you doing that? Then, ideally, the commits would be squashed, then we can merge. |
@jgraham Yes I reviewed them back in Nov, but I don't have much experience with WPT so I assumed we'd need review from someone else too. @choniong, you had talked to someone on #testing about getting a review right? |
Review status: 0 of 3 files reviewed at latest revision, 1 unresolved discussion. touch-events/touch-touchevent-constructor.html, line 15 [r3] (raw file): Comments from the review on Reviewable.io |
Reviewed 1 of 3 files at r2, 2 of 2 files at r3. Comments from the review on Reviewable.io |
Review status: all files reviewed at latest revision, 9 unresolved discussions. touch-events/create-touch-touchlist.html, line 36 [r3] (raw file): touch-events/touch-touchevent-constructor.html, line 19 [r3] (raw file): touch-events/touch-touchevent-constructor.html, line 28 [r3] (raw file): touch-events/touch-touchevent-constructor.html, line 30 [r3] (raw file): touch-events/touch-touchevent-constructor.html, line 65 [r3] (raw file): touch-events/touch-touchevent-constructor.html, line 128 [r3] (raw file): touch-events/touch-touchevent-constructor.html, line 142 [r3] (raw file): touch-events/touch-touchevent-constructor.html, line 147 [r3] (raw file): Comments from the review on Reviewable.io |
Review status: all files reviewed at latest revision, 9 unresolved discussions. touch-events/touch-touchevent-constructor.html, line 19 [r3] (raw file): touch-events/touch-touchevent-constructor.html, line 28 [r3] (raw file): Comments from the review on Reviewable.io |
@Ms2ger thanks for doing a review, we really appreciate it! Big picture I'd like to get my blink input team (and ultimately the rest of Google web platform teams) contributing much more actively to WPT, so I appreciate your patience while we get ramped up on the process / style. |
Review status: all files reviewed at latest revision, 9 unresolved discussions. touch-events/touch-touchevent-constructor.html, line 19 [r3] (raw file): touch-events/touch-touchevent-constructor.html, line 28 [r3] (raw file): Comments from the review on Reviewable.io |
Reviewed 2 of 3 files at r2. touch-events/create-touch-touchlist.html, line 36 [r3] (raw file): touch-events/touch-touchevent-constructor.html, line 28 [r3] (raw file): Comments from the review on Reviewable.io |
Review status: all files reviewed at latest revision, 3 unresolved discussions. touch-events/touch-touchevent-constructor.html, line 19 [r3] (raw file): touch-events/touch-touchevent-constructor.html, line 28 [r3] (raw file): Comments from the review on Reviewable.io |
Review status: all files reviewed at latest revision, 3 unresolved discussions. touch-events/touch-touchevent-constructor.html, line 28 [r3] (raw file): Comments from the review on Reviewable.io |
Review status: 0 of 3 files reviewed at latest revision, 9 unresolved discussions. touch-events/create-touch-touchlist.html, line 36 [r3] (raw file): touch-events/touch-touchevent-constructor.html, line 15 [r3] (raw file): touch-events/touch-touchevent-constructor.html, line 19 [r3] (raw file): touch-events/touch-touchevent-constructor.html, line 28 [r3] (raw file): touch-events/touch-touchevent-constructor.html, line 30 [r3] (raw file): touch-events/touch-touchevent-constructor.html, line 65 [r3] (raw file): touch-events/touch-touchevent-constructor.html, line 128 [r3] (raw file): touch-events/touch-touchevent-constructor.html, line 142 [r3] (raw file): touch-events/touch-touchevent-constructor.html, line 147 [r3] (raw file): Comments from the review on Reviewable.io |
Hi @Ms2ger , sorry for the slow response, but can you take a look at the updated PR please? Thanks! |
<div id="target0"></div> | ||
<script> | ||
test(function() { | ||
assert_throws({name: 'TypeError'}, function() {new Touch();}, "Touch constructor requires initialize dictionary"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert_throws(new TypeError(), ...)
is more idiomatic
On the testharness side, this looks good to me with the one nit fixed. No comment on whether the tests are correct otherwise. |
Thanks for the prompt response! I've fixed the nit, so is it ok to merge or do I need to ask for another correctness review? |
I looked over the correctness again, and it still looks good to me. Please run your test on Chrome after your final changes (if you haven't already) to verify it still passes. Then I'm guessing @Ms2ger will want you to squash all your commits into a single one (use |
Moved common test code into a shared JS Removed unused touchList code Switch to common touch-support.js Test with insufficient and minimum properties Fixed duplicate test name issue Fix style as per Ms2ger's comments Use 'new TypeError()' for assert_throws
ad60668
to
354a82d
Compare
Sure I've tested on Chrome and it still passes, and commits are squashed into one now. Thanks! |
Added constructor tests for Touch and TouchEvent
Thank you @choniong! |
@RByers Added constructor tests for Touch and TouchEvent based on Touch Events v2 - Touch Interface and Touch Events v2 - TouchEvent Interface
Browser support:
Chrome Canary: Yes
Firefox, Safari, Edge: Not yet
Issue tracking: w3c/touch-events#27