Closed Bug 1520785 Opened 5 years ago Closed 4 years ago

Reenable pointerevent_setpointercapture_inactive_button_mouse.html

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P3)

defect

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox83 --- fixed

People

(Reporter: jgraham, Assigned: edgar)

References

Details

Attachments

(1 file)

After wptrunner changed the following test became unstable and had to be disabled:

pointerevents/pointerevent_setpointercapture_inactive_button_mouse.html

Depends on: 1520788
Priority: -- → P2
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4c960867eb14
Disable flaky pointer events test, a=testonly

The leave-open keyword is there and there is no activity for 6 months.
:hsinyi, maybe it's time to close this bug?

Flags: needinfo?(htsai)

(In reply to Release mgmt bot [:sylvestre / :calixte / :marco for bugbug] from comment #3)

The leave-open keyword is there and there is no activity for 6 months.
:hsinyi, maybe it's time to close this bug?

No.

Flags: needinfo?(htsai)

The leave-open keyword is there and there is no activity for 6 months.
:hsinyi, maybe it's time to close this bug?

Flags: needinfo?(htsai)
No longer depends on: 1519865

(In reply to Release mgmt bot [:sylvestre / :calixte / :marco for bugbug] from comment #5)

The leave-open keyword is there and there is no activity for 6 months.
:hsinyi, maybe it's time to close this bug?

No.

No longer depends on: 1520788
Flags: needinfo?(htsai)
Summary: Pointer events test unstable after wptrunner changes → Reenable pointerevent_setpointercapture_inactive_button_mouse.html
Blocks: 822898

The leave-open keyword is there and there is no activity for 6 months.
:hsinyi, maybe it's time to close this bug?

Flags: needinfo?(htsai)

(In reply to Release mgmt bot [:sylvestre / :calixte / :marco for bugbug] from comment #7)

The leave-open keyword is there and there is no activity for 6 months.
:hsinyi, maybe it's time to close this bug?

no

Flags: needinfo?(htsai)

Test got InvalidPointerId: Invalid pointer id exception in https://searchfox.org/mozilla-central/rev/969fc7fa6c3c7fc489f53b7b7f8c902028b5169f/testing/web-platform/tests/pointerevents/pointerevent_setpointercapture_inactive_button_mouse.html#39 because of there is no valid entry in sActivePointersIds. We add a new entry for mouse while receiving eMouseEnterIntoWidget, but web driver synthesizes mousemove event in content process directly, so there is no eMouseEnterIntoWidget dispatched.

Blocks: 1662094

(In reply to Edgar Chen [:edgar] from comment #9)

Test got InvalidPointerId: Invalid pointer id exception in https://searchfox.org/mozilla-central/rev/969fc7fa6c3c7fc489f53b7b7f8c902028b5169f/testing/web-platform/tests/pointerevents/pointerevent_setpointercapture_inactive_button_mouse.html#39 because of there is no valid entry in sActivePointersIds. We add a new entry for mouse while receiving eMouseEnterIntoWidget, but web driver synthesizes mousemove event in content process directly, so there is no eMouseEnterIntoWidget dispatched.

Set test.events.async.enabled to true would fix this given that the event would go through parent process, but met another issue that tests doesn't receive pointerout event.

(In reply to Edgar Chen [:edgar] from comment #10)

but met another issue that tests doesn't receive pointerout event.

Okay, I think I know what's happening: the second pointerMove is blocked by marionette. The inputState seems not to be maintained correctly, it use a.id as a key to get input state, however a.id seems an incremental identity for action message, I think we should use input source as the key for pointer message.
Edit: Just check the spec, marionette do follow the spec to implement, it looks like it is because the test creates two actions. So the question is why marionette ignore pointerMove in https://searchfox.org/mozilla-central/rev/0c682c4f01442c3de0fa6cd286e9cadc8276b45f/testing/marionette/action.js#1438-1440.

(In reply to Edgar Chen [:edgar] from comment #11)

the question is why marionette ignore pointerMove in https://searchfox.org/mozilla-central/rev/0c682c4f01442c3de0fa6cd286e9cadc8276b45f/testing/marionette/action.js#1438-1440.

Looks like defined in the spec, see step 7 of https://w3c.github.io/webdriver/#dfn-perform-a-pointer-move. Then the first pointermove action would be ignored if the coordinate is (0,0), like https://searchfox.org/mozilla-central/rev/0c682c4f01442c3de0fa6cd286e9cadc8276b45f/testing/web-platform/tests/pointerevents/pointerevent_setpointercapture_inactive_button_mouse.html#42. But it seems to work on other browsers, https://wpt.fyi/results/pointerevents/pointerevent_setpointercapture_inactive_button_mouse.html?label=experimental&label=master&aligned.

Hi Maja, do you have some ideas about this? It could possible that I miss something or misread the spec. Thanks!

Flags: needinfo?(mjzffr)
Severity: normal → S3
Component: DOM: Events → DOM: UI Events & Focus Handling
Priority: P2 → P3

My understanding of the spec matches yours so maybe this is a spec bug. Have you checked what ChromeDriver does?

To be clear, the test is purposely emitting a "no-op" pointer event, or did I misread?

Flags: needinfo?(mjzffr) → needinfo?(echen)

(In reply to Maja Frydrychowicz :maja_zf (UTC-4) (maja@mozilla.com) from comment #13)

Have you checked what ChromeDriver does?

Nope, but I guess ChromeDriver behaves differently, given that they could pass the test.

To be clear, the test is purposely emitting a "no-op" pointer event, or did I misread?

No, the test tries to move the pointer out of target0 by emitting a pointermove event at (0,0) of the viewport.

Flags: needinfo?(echen)

(In reply to Maja Frydrychowicz :maja_zf (UTC-4) (maja@mozilla.com) from comment #13)

My understanding of the spec matches yours so maybe this is a spec bug.

Filed https://github.com/w3c/webdriver/issues/1545.

(In reply to Edgar Chen [:edgar] from comment #17)

https://treeherder.mozilla.org/#/jobs?repo=try&revision=bacc7017fe3bb463391ef495aee3be7c0ae46eb0

Hmm, there seems a crash on Android..

(In reply to Edgar Chen [:edgar] from comment #15)

(In reply to Maja Frydrychowicz :maja_zf (UTC-4) (maja@mozilla.com) from comment #13)

My understanding of the spec matches yours so maybe this is a spec bug.

Filed https://github.com/w3c/webdriver/issues/1545.

I took a quick look and it seems the first action specifies input source id 1, moves that to (640,211) and then the second action specifies input source 3 and tries to move from (0,0) to (0,0).

If I understand right, the second action should move input source 1 from (640,211) to (0,0). The input source ids seem to be incremented, so perhaps this is a problem with how the test harness constructs action sequences?

Running ./mach wpt testing/web-platform/tests/pointerevents/pointerevent_setpointercapture_inactive_button_mouse.html --setpref marionette.log.level=trace --setpref marionette.log.truncate=false --setpref test.events.async.enabled=true

<snip>

 0:04.37 pid:263823 1600441547362	Marionette	DEBUG	2 -> [0,16,"WebDriver:PerformActions",{"actions":[{"type":"none","id":"0","actions":[{"duration":16,"type":"pause"}]},{"type":"pointer","parameters":{"pointerType":"mouse"},"actions":[{"y":0,"x":0,"frame":{"frame":"window"},"type":"pointerMove","origin":{"element-6066-11e4-a52e-4f735466cecf":"04bf744b-3933-4ee9-95f1-417d6f1a50b2","chromeelement-9fc5-4b51-a3c8-01716eedeb04":"04bf744b-3933-4ee9-95f1-417d6f1a50b2"}}],"id":"1"}]}]
 0:04.37 pid:263823 1600441547369	Marionette	TRACE	Getting inputState for 0
 0:04.38 pid:263823 1600441547369	Marionette	TRACE	Input state is (undefined, undefined)
 0:04.38 pid:263823 1600441547369	Marionette	TRACE	Getting inputState for 1
 0:04.38 pid:263823 1600441547369	Marionette	TRACE	Input state is (0, 0)
 0:04.38 pid:263823 1600441547369	Marionette	TRACE	Input state start (0, 0)
 0:04.38 pid:263823 1600441547369	Marionette	TRACE	Input state target (640, 211)
 0:04.40 pid:263823 1600441547393	Marionette	TRACE	Input state after (640, 211)
 0:04.40 pid:263823 1600441547395	Marionette	DEBUG	2 <- [1,16,null,{"value":null}]
 0:04.41 pid:263823 1600441547398	Marionette	DEBUG	2 -> [0,17,"WebDriver:ExecuteScript",{"script":"window.postMessage({\"status\": \"success\", \"message\": \"{\\\"result\\\": null}\", \"type\": \"testdriver-complete\"}, '*')","newSandbox":false,"args":[],"filename":"testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executormarionette.py","sandbox":null,"line":87}]
 0:04.41 pid:263823 1600441547400	Marionette	DEBUG	2 <- [1,17,null,{"value":null}]
 0:04.41 pid:263823 1600441547403	Marionette	DEBUG	2 -> [0,18,"WebDriver:ExecuteAsyncScript",{"scriptTimeout":null,"newSandbox":false,"args":[],"filename":"testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executormarionette.py","script":"// We have to set the url here to ensure we get the same escaping as in the harness\n// and also to handle the case where the test changes the fragment\nwindow.__wptrunner_url = \"/pointerevents/pointerevent_setpointercapture_inactive_button_mouse.html\";\nwindow.__wptrunner_testdriver_callback = arguments[arguments.length - 1];\nwindow.__wptrunner_process_next_event();","sandbox":null,"line":87}]
 0:04.42 INFO {'actions': [{u'type': u'none', u'id': u'2', u'actions': [{u'duration': 16, u'type': u'pause'}]}, {u'type': u'pointer', u'actions': [{u'y': 0, u'x': 0, u'type': u'pointerMove', u'origin': u'viewport'}], u'parameters': {u'pointerType': u'mouse'}, u'id': u'3'}]}
 0:04.42 pid:263823 1600441547411	Marionette	DEBUG	2 <- [1,18,null,{"value":["/pointerevents/pointerevent_setpointercapture_inactive_button_mouse.html","action",{"type":"action","action":"action_sequence","actions":[{"type":"none","actions":[{"type":"pause","duration":16}],"id":"2"},{"type":"pointer","actions":[{"type":"pointerMove","x":0,"y":0,"origin":"viewport"}],"parameters":{"pointerType":"mouse"},"id":"3"}]}]}]
 0:04.42 pid:263823 1600441547413	Marionette	DEBUG	2 -> [0,19,"WebDriver:PerformActions",{"actions":[{"type":"none","id":"2","actions":[{"duration":16,"type":"pause"}]},{"type":"pointer","parameters":{"pointerType":"mouse"},"actions":[{"y":0,"x":0,"type":"pointerMove","origin":"viewport"}],"id":"3"}]}]
 0:04.42 pid:263823 1600441547415	Marionette	TRACE	Getting inputState for 2
 0:04.42 pid:263823 1600441547415	Marionette	TRACE	Input state is (undefined, undefined)
 0:04.42 pid:263823 1600441547415	Marionette	TRACE	Getting inputState for 3
 0:04.42 pid:263823 1600441547415	Marionette	TRACE	Input state is (0, 0)
 0:04.42 pid:263823 1600441547415	Marionette	TRACE	Input state start (0, 0)
 0:04.42 pid:263823 1600441547415	Marionette	TRACE	Input state target (0, 0)
 0:04.44 pid:263823 1600441547433	Marionette	TRACE	Input state after (0, 0)
 0:04.45 pid:263823 1600441547439	Marionette	DEBUG	2 <- [1,19,null,{"value":null}]

(In reply to Maja Frydrychowicz :maja_zf (UTC-4) (maja@mozilla.com) from comment #19)

If I understand right, the second action should move input source 1 from (640,211) to (0,0). The input source ids seem to be incremented, so perhaps this is a problem with how the test harness constructs action sequences?

What the test does is something like

new test_driver.Actions().pointerMove(640, 211).send();
...
new test_driver.Actions().pointerMove(0, 0).send();

So it seems like the input source ids are incremented because it creates two action sets?

And If we do

new test_driver.Actions().pointerMove(640, 211).pointerMove(0, 0).send();

Then we would use the same source id, I guess.

Depends on: 1666201
Assignee: nobody → echen
Status: NEW → ASSIGNED
Pushed by echen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/94bf1aff7bff
Reenable pointerevent_setpointercapture_inactive_button_mouse.html; r=smaug
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/25906 for changes under testing/web-platform/tests
Upstream PR was closed without merging

Hmm, I could not reproduce the failure undre test-verify mode locally...

Let's disable it on mac && verify first, file bug 1668959 for tracking.

Flags: needinfo?(echen)
Pushed by echen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/14d03e26ce9e
Reenable pointerevent_setpointercapture_inactive_button_mouse.html; r=smaug

Ah, forgot to remove leave-open.

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Keywords: leave-open
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
Upstream PR merged by jgraham
See Also: → 1823661
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: