Closed Bug 1963567 Opened 2 months ago Closed 1 month ago

Use widget events through Marionette for wheel scroll actions in interop2025 apz scrolling tests

Categories

(Core :: Panning and Zooming, task, P2)

task
Points:
2

Tracking

()

RESOLVED FIXED
140 Branch
Tracking Status
firefox140 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

(Blocks 1 open bug)

Details

(Whiteboard: [webdriver:m16])

Attachments

(1 file)

For interop2025 there is a scrollend section that we want to see completely passing by end of this year:
https://wpt.fyi/results/dom/events/scrolling?label=master&label=experimental&aligned&view=interop&q=label%3Ainterop-2025-scrollend

Therefore we have to send the wheel scroll events through Marionette by using widget events as dispatched through the parent process. The required work for that is done via bug 1848957. As noticed with this try build we are still failing a lot of scrolling tests due to timeouts. I haven't fully investigated those yet but it's most likely that those failures are happening because we do not wait for the event to be dispatched. As such especially in longer action chains events are overlapping and checks are done before the event was actually dispatched. As such I filed bug 1963550 so we have at least the wait logic around for wheel scroll (other events shouldn't have such a high priority for now).

The patch to enable those tests, that I previously already wanted to push with bug 1848957, I'm going to move to this bug so that it's not blocking the landing of bug 1848957.

Whiteboard: [webdriver:m16]
Assignee: nobody → hskupin
Status: NEW → ASSIGNED

I pushed a try build with trace logs enabled. Lets see if that one gives a bit more clarity:
https://treeherder.mozilla.org/jobs?repo=try&revision=4b0677f07809c188155e5cf8c54da8f2e366286b

This is actually interesting!

In this line of the log we are setting remote.events.async.wheel.enabled to true (as given in the prefs section of the manifest).

But when we actually performing the action we do not synthesize the event through the parent process (see the async: false in the WheelScrollAction line):

[task 2025-04-30T12:32:44.360Z] 12:32:44     INFO - PID 890 | 1746016364356	Marionette	DEBUG	2 -> [0,566,"WebDriver:PerformActions",{"actions":[{"type":"none","actions":[{"type":"pause","duration":16}],"id":"0"},{"type":"wheel","actions":[{"type":"scroll","x":0,"y":0,"deltaX":0,"deltaY":213,"origin":{"element-6066-11e4-a52e-4f735466cecf":"04596000-95d0-469f-8605-b59be6d57576"}}],"id":"1"}]}]
[task 2025-04-30T12:32:44.360Z] 12:32:44     INFO - PID 890 | 1746016364357	RemoteAgent	TRACE	Dispatching tick 1/1
[task 2025-04-30T12:32:44.360Z] 12:32:44     INFO - PID 890 | 1746016364357	RemoteAgent	TRACE	 Dispatch PauseAction with 0 16
[task 2025-04-30T12:32:44.369Z] 12:32:44     INFO - PID 890 | 1746016364368	RemoteAgent	TRACE	Dispatch WheelScrollAction with id: 1 pageX: 100 pageY: 100 deltaX: 0 deltaY: 213 async: false
[task 2025-04-30T12:32:44.370Z] 12:32:44     INFO - PID 890 | 1746016364368	RemoteAgent	TRACE	moveOverTime start: 0,0 target: 0,213 duration: 16
[task 2025-04-30T12:32:44.386Z] 12:32:44     INFO - PID 890 | 1746016364385	RemoteAgent	TRACE	WheelScrollAction.performOneWheelScrollStep [0,213]

This totally explains why the test is failing and no scroll(end) events are emitted by the browser.

What's not clear to me is why this is happening because I do not see it when running wpt tests via mach.

So I'm currently using a lazy getter for retrieving the preference value. This is causing the failures with wpt tests because prefs entries in manifest files are test file related, and we do not restart Firefox in between tests within the same folder. As such the tests are currently failing to correctly dispatch the actions through the parent process.

Blocks: 1963461

A try push can be found here:
https://treeherder.mozilla.org/jobs?repo=try&searchStr=wpt&revision=a7aa69dffbca8bc8482b9d2e30967a18323a2c6e

So far it looks fine and I'm only waiting for Mac jobs to get run. If all tests are passing we can get the patch landed.

Points: --- → 2
Priority: -- → P2
Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/da849de0d40f [wpt] Enable widget events for wheel scrolling tests. r=hiro
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 140 Branch
No longer depends on: 1963550
Blocks: 1964903
QA Whiteboard: [qa-triage-done-c141/b140]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: