Update test_wpt_touch_action.html to async/await style
Categories
(Core :: Panning and Zooming, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox87 | --- | fixed |
People
(Reporter: kats, Assigned: kats)
References
Details
Attachments
(3 files)
Back in the day, there were a bunch of WPT pointerevents tests that were "manual", i.e. they set up some touch-action state, required the user to manually do some scrolling, and then would check expectations. To automated those tests, I created https://searchfox.org/mozilla-central/source/dom/events/test/pointerevents/test_touch_action.html which used the APZ native event synthesization functions to produce the expected "manual" events and drive the test.
However, since then, it appears that those manual tests have been automated in WPT using testdriver. See e.g. https://hg.mozilla.org/mozilla-central/rev/a92aa973bfc91cec332dcb2a0b4bfcc5eaca5fc6 for what I think is the first in a series of commits that did this.
We should check to make sure all the subtests in test_touch_action.html are now automated in WPT, and if so, remove test_touch_action.html entirely.
Assignee | ||
Comment 1•3 years ago
|
||
Apparently WPT doesn't support touch, per https://bugzilla.mozilla.org/show_bug.cgi?id=1543337
So we'll need to keep test_touch_action.html for now. Morphing this bug to update those tests to async/await style instead, since they use a lot of the yield-style functions from apz_test*utils.js.
Assignee | ||
Comment 2•3 years ago
|
||
- Test was renamed recently
- Test is disabled on Android. So ignore the android failures on this try push: https://treeherder.mozilla.org/jobs?repo=try&revision=ea5c1d4afa02e7b207915abac574b7f1ca2d46fa
- https://treeherder.mozilla.org/#/jobs?repo=try&revision=42161ba596bdd87e5655d5fb32f86167a3c3b8c9 is the windows try push
Assignee | ||
Comment 3•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Comment 4•3 years ago
|
||
I removed the setup functions since we want to avoid having long-lasting
touchend listeners, and instead added promiseTouchEnd calls to the touch-
synthesizing functions (touchScrollRight and touchScrollDown). Also I
moved the add_completion_callback stuff out of the setup functions. In
the case where the test function was using touchActionSetup, the
completion callback is triggered by clicking on the "btnComplete" button
in tapComplete, so I moved the completion promise in there. In the
remaining cases, where the test function was using touchActionSetupAndWaitTestDone,
it's usually the final scroll of the test that triggers the completion
callback, and so I just inlined the promise into the start of the
test function.
Depends on D102860
Assignee | ||
Comment 5•3 years ago
|
||
Depends on D102861
Pushed by kgupta@mozilla.staktrace.com: https://hg.mozilla.org/integration/autoland/rev/d6750099ae4c Simplify injectScript and callers. r=botond https://hg.mozilla.org/integration/autoland/rev/b07c3f33d04f Convert touch_action_helpers.js to async/await style. r=botond https://hg.mozilla.org/integration/autoland/rev/9400a0ace4ed Move runContinuation out of apz_test_utils.js and into the single remaining test that uses it. r=botond
Comment 7•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d6750099ae4c
https://hg.mozilla.org/mozilla-central/rev/b07c3f33d04f
https://hg.mozilla.org/mozilla-central/rev/9400a0ace4ed
Description
•