test_moz_mouse_pixel_scroll_event.html fails with APZ enabled

RESOLVED FIXED in Firefox 42

Status

()

Core
Panning and Zooming
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: kats, Assigned: kats)

Tracking

unspecified
mozilla42
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox42 fixed)

Details

Attachments

(3 attachments, 4 obsolete attachments)

test_moz_mouse_pixel_scroll_event.html (in m-e10s-1) fails with APZ enabled on Linux. I was able to reproduce locally and debug using rr. The first problem turned out to be that the MozMousePixelScroll event that the test waits for becomes asynchronous with APZ enabled, and so the test needs to be updated to yield after synthesizing the wheel event.

Even with that fixed though there appears to be a race somewhere (which I *can't* reproduce locally) that causes some of the test assertions to fail on try.
Created attachment 8626447 [details] [diff] [review]
Patch

This fixes the issue I identified above, but the test isn't fully green yet.
Depends on: 1178060
Created attachment 8626958 [details] [diff] [review]
Part 1 - Yield after synthesizing wheel events
Attachment #8626447 - Attachment is obsolete: true
Created attachment 8626959 [details] [diff] [review]
Part 2 - MozMousePixelScroll events are APZ-aware too

Doing a preventDefault on a MozMousePixelScroll event is supposed to cancel the scrolling, so APZ needs to wait for the response, and therefore layout needs to put areas covered by these events in the dispatch-to-content region.
Created attachment 8626960 [details] [diff] [review]
Part 3 - Extend content response timeout to deal with the test running slowly in automation

We may or may not need this also. It was one of my earlier attempts at fixing this problem (before I figured out part 2 and the dependent bug).

I did a try push without this patch at https://treeherder.mozilla.org/#/jobs?repo=try&revision=5b0b2ea9d345, if that's green then we shouldn't need this.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=6d2c22105132 is better, with less logging.
The test is still failing but with a lower frequency it appears. I did another push with the part 3 patch at https://treeherder.mozilla.org/#/jobs?repo=try&revision=a6f1df7f8cc5, but I also discovered another potential problem - the AddEventListener call in the test doesn't trigger a new layers transaction, so the event regions on the APZ side are stale. We might need to trigger a layout flush of some sort if an APZ-aware listener is added or removed.
Attachment #8626960 - Attachment description: Part 3 WIP → Part 3 - Extend content response timeout to deal with the test running slowly in automation
Created attachment 8627257 [details] [diff] [review]
Part 1 - Yield after synthesizing wheel events
Attachment #8626958 - Attachment is obsolete: true
Attachment #8627257 - Flags: review?(dvander)
Created attachment 8627258 [details] [diff] [review]
Part 2 - MozMousePixelScroll events are APZ-aware too
Attachment #8626959 - Attachment is obsolete: true
Attachment #8627258 - Flags: review?(dvander)
Created attachment 8627260 [details] [diff] [review]
Part 3 - Extend the content response timeout
Attachment #8626960 - Attachment is obsolete: true
Attachment #8627260 - Flags: review?(dvander)
Attachment #8627257 - Flags: review?(dvander) → review+
Attachment #8627258 - Flags: review?(dvander) → review+
Attachment #8627260 - Flags: review?(dvander) → review+
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #6)
> The test is still failing but with a lower frequency it appears. I did
> another push with the part 3 patch at
> https://treeherder.mozilla.org/#/jobs?repo=try&revision=a6f1df7f8cc5, but I
> also discovered another potential problem - the AddEventListener call in the
> test doesn't trigger a new layers transaction, so the event regions on the
> APZ side are stale. We might need to trigger a layout flush of some sort if
> an APZ-aware listener is added or removed.

Yuck. That could explain why other tests are intermittently failing.

Comment 11

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/bf2dc08fe83a
https://hg.mozilla.org/integration/mozilla-inbound/rev/55a2ebc33984
https://hg.mozilla.org/integration/mozilla-inbound/rev/e8ea2a9493da
(In reply to David Anderson [:dvander] from comment #10)
> Yuck. That could explain why other tests are intermittently failing.

Possibly, yeah. I filed bug 1178743 for it.
https://hg.mozilla.org/mozilla-central/rev/bf2dc08fe83a
https://hg.mozilla.org/mozilla-central/rev/55a2ebc33984
https://hg.mozilla.org/mozilla-central/rev/e8ea2a9493da
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox42: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.