Closed Bug 1686687 Opened 3 years ago Closed 3 years ago

Update test_wpt_touch_action.html to async/await style

Categories

(Core :: Panning and Zooming, task)

task

Tracking

()

RESOLVED FIXED
87 Branch
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.

Blocks: 1613410

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.

Summary: Audit and remove test_touch_action.html → Update test_touch_action.html to async/await style
No longer blocks: 1613410
  1. Test was renamed recently
  2. Test is disabled on Android. So ignore the android failures on this try push: https://treeherder.mozilla.org/jobs?repo=try&revision=ea5c1d4afa02e7b207915abac574b7f1ca2d46fa
  3. https://treeherder.mozilla.org/#/jobs?repo=try&revision=42161ba596bdd87e5655d5fb32f86167a3c3b8c9 is the windows try push
Summary: Update test_touch_action.html to async/await style → Update test_wpt_touch_action.html to async/await style
Assignee: nobody → kats
Status: NEW → ASSIGNED

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

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
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: