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

Added a test for suppressed mouse events on canceled pointerdown #3202

Merged
merged 5 commits into from
Jul 5, 2016
Merged

Added a test for suppressed mouse events on canceled pointerdown #3202

merged 5 commits into from
Jul 5, 2016

Conversation

mustaqahmed
Copy link
Member

Closes #3189

@wpt-pr-bot
Copy link
Collaborator

Reviewers for this pull request are: @EvgenyAgafonchikov, @Steditor, @bethge, @jacobrossi, @plehegar, @scottgonzalez, and @staktrace.

@hoppipolla-critic-bot
Copy link

Critic review: https://critic.hoppipolla.co.uk/r/6644

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 git rebase -i or git commit --amend) when updating this pull request.

@mustaqahmed
Copy link
Member Author

mustaqahmed commented Jun 27, 2016

ptal, resolved the sync problem in my branch.

@scottgonzalez any comments?

@RByers
Copy link
Contributor

RByers commented Jun 29, 2016

Looks reasonable to me. Is it worth also adding a "drag" case so we can verify that no mousemove is generated? Obviously it would have to be robust to the number of move events - so maybe append to the log at most once for move events?

@mustaqahmed
Copy link
Member Author

I tried exactly that in my first commit. The problem is that neither Edge nor Chrome fires any mouse events on touch drag, so the no-canceled pointerdown case fails.

Does it make sense to split the test into touch and non-touch case?

"pointerdown@target0, " +
"pointerup@target0, " +
"pointerdown@target1, mousedown@target1, " +
"pointerup@target1, mouseup@target1");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines are indented one too many times.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, ptal.

Also split the test into two cases: click/tap (for any pointer type) and drag (only for mouse).

@RByers
Copy link
Contributor

RByers commented Jul 1, 2016

Splitting into two tests makes sense to me. We should be designing our tests for an environment (like Edge, blink and jQuery's harnesses) where they're all automated anyway (since manual tests are of very little value in practice).

There's a lot of boilerplate / duplicated code between theses tests though, but I guess that's a maintenance burden issue for many of the pointer events tests (not necessarily something to be solved in this commit).

@mustaqahmed
Copy link
Member Author

FYI: both tests are passing on Chrome & Edge.

@RByers
Copy link
Contributor

RByers commented Jul 5, 2016

LGTM, thanks

@RByers RByers merged commit 1b24341 into web-platform-tests:master Jul 5, 2016
@mustaqahmed mustaqahmed deleted the suppressed-mouse-on-prevent-default branch August 18, 2016 21:32
ddorwin pushed a commit to ddorwin/web-platform-tests that referenced this pull request Sep 13, 2016
…platform-tests#3202)

Two separate tests: one for the general tap case and another for the mouse-drag case.

Doesn't attempt to test the behavior for touch drag because the spec and implementations often don't yet match (w3c/pointerevents/web-platform-tests#7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants