Closed Bug 1288799 Opened 7 years ago Closed 7 years ago

Clean up and fully automate W3C touch-action tests


(Core :: DOM: Events, defect)

Not set



Tracking Status
firefox50 --- fixed


(Reporter: kats, Assigned: kats)




(3 files, 3 obsolete files)

The W3C spec for pointer events has a bunch of touch-action tests that can be run manually. They live in our testing/web-platform/tests/pointerevents/ folder, but are not run in automation. Our WebDriver setup doesn't seem to support native event synthesization, and while I looked into it briefly, it seems nontrivial to add.

There is also a copy of the tests in dom/events/test/pointerevents/, which Maksim added. These are the same tests, but modified to run as mochitests. Except that they're all disabled, and the modifications don't make a lot of sense to me. They still don't use the native event synthesization APIs.

I would like to dust off these tests and get them working again, using native event synthesization so that they simulate what a user would do while running the test manually. I have a proof of concept working, so I'm fairly confident this can be done.
Summary: Clean up and fully automate touch-action tests → Clean up and fully automate W3C touch-action tests
The above pass for me locally on OS X (with the patches from bug 1278009 and bug 1288187 applied). Try push:
Above try push shows failures on Linux, and I see similar failures when I run it locally on my Windows Surface device. I'll dig into it. Probably just a timing issue somewhere, it looks like some of the synthesized events are getting lost maybe.
There turned out to be a couple of issues. One was that the scroll amounts (10px) I was using were too small, so they were getting detected as taps/double-taps in some cases. Scrolling 50px fixed that. The other issue was a legitimate bug in the APZ code where we weren't handling "pan-x pan-y" properly. I have patches, just waiting for try runs to go green before I put them up.
The plan here is to remove the old (disabled, and not really working) mochitest version of the W3C touch-action tests, and replace it with something better. The final state will have the unmodified test files from the W3C suite, with a mochitest wrapper that loads those tests and simulates the touch input needed to exercise the tests. This patch just removes the old things, the new stuff will come in part 3.
Attachment #8774121 - Attachment is obsolete: true
Attachment #8775835 - Flags: review?(bugs)
The try push at has these tests running and passing on Linux and OS X inside the M-e10s-2 job.
Attachment #8774123 - Attachment is obsolete: true
Attachment #8775837 - Flags: review?(bugs)
Comment on attachment 8775835 [details] [diff] [review]
Part 1 - Remove old test stuffs and import unmodified W3C files

Attachment #8775835 - Flags: review?(bugs) → review+
Comment on attachment 8775837 [details] [diff] [review]
Part 3 - Add the new mochitest that runs the W3C touch action tests

Don't you need something for the case if apz isn't enabled.
Like, todo(); or so.

Attachment #8775837 - Flags: review?(bugs) → review+
(In reply to Olli Pettay [:smaug] from comment #11)
> Don't you need something for the case if apz isn't enabled.
> Like, todo(); or so.

It's a little sneaky but the isApzEnabled() check has that built-in.
Attachment #8775836 - Flags: review?(botond) → review+
Pushed by
Delete the old mochitest wrappers for the touch-action mochitests, and copy over the unmodified W3C files. rs=smaug
Add a hook to run a custom onload function in APZ group subtests, and a helper to inject scripts into documents. r=botond
Add a test_touch_action.html which runs all of the W3C touch-action tests as mochitests. rs=smaug
You need to log in before you can comment on or make changes to this bug.