Closed Bug 1697656 Opened 4 years ago Closed 4 years ago

[wpt-sync] Sync PR 28010 - Fix flaky pointerevent_pointercapture_in_frame

Categories

(Core :: DOM: Events, task, P4)

task

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 28010 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/28010
Details from upstream follow.

b'Liviu Tinta <liviutinta@chromium.org>' wrote:

Fix flaky pointerevent_pointercapture_in_frame

There are a few things fixed:

  • when sending input via test_driver.Actions(), successive pointermove
    events might be coalesced which would make the test fail as it expects 2
    pointermove events instead of 1. I propose to log/check only the first
    pointermove event.

  • when sending input via test_driver.Actions(), the sending is
    asynchronous. In certain conditions we run the assert_equals test
    before all events have a chance to run. I propose to wait for the
    interesting events (lostpointercapture, pointerup) using EventWatcher
    before running assert_equals.

  • when lostpointercapture is the last pointer event in the test for
    the frame, in certain conditions lostpointercapture might not be fired,
    as it is fired with the next pointer event ([1]). I propose to add
    pointermove actions after pointerup to make sure lostpointercapture
    is fired.

I've opened a pull request on pointer events spec [2] to specify the
behaviour described in point 3 above.

[1] https://github.com/w3c/pointerevents/issues/32
[2] https://github.com/w3c/pointerevents/pull/354

Bug: 1040874
Change-Id: I7b550fbfc7e1351bb3f76551dc5efa04666042f2

Reviewed-on: https://chromium-review.googlesource.com/2745276
WPT-Export-Revision: 91530cdbf2be16f5d896a9623c04e01dd745d4c7

Component: web-platform-tests → DOM: Events
Product: Testing → Core

CI Results

Ran 15 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 3 tests and 4 subtests

Status Summary

Firefox

OK : 1
PASS : 3
FAIL : 1
ERROR: 2

Chrome

OK : 3
PASS : 11
FAIL : 1

Safari

OK : 3
PASS : 11
FAIL : 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

/pointerevents/pointerevent_pointercapture_in_frame.html?mouse
Test mousepointer capture in same-origin frame: Pointer down at outer frame body and set pointer capture.: FAIL
/pointerevents/pointerevent_pointercapture_in_frame.html?pen: ERROR
/pointerevents/pointerevent_pointercapture_in_frame.html?touch: ERROR

New Tests That Don't Pass

/pointerevents/pointerevent_pointercapture_in_frame.html?mouse
Test mousepointer capture in same-origin frame: Pointer down at outer frame body and set pointer capture.: FAIL (Chrome: PASS, Safari: PASS)
/pointerevents/pointerevent_pointercapture_in_frame.html?pen: ERROR (Chrome: OK, Safari: OK)
/pointerevents/pointerevent_pointercapture_in_frame.html?touch: ERROR (Chrome: OK, Safari: OK)

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a81086cb53c0 [wpt PR 28010] - Fix flaky pointerevent_pointercapture_in_frame, a=testonly https://hg.mozilla.org/integration/autoland/rev/c59cec6e67be [wpt PR 28010] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
You need to log in before you can comment on or make changes to this bug.