Allow mochitests to accurately determine if APZ is enabled

RESOLVED FIXED in Firefox 42

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: botond, Assigned: kats)

Tracking

Trunk
mozilla42
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox42 fixed)

Details

Attachments

(2 attachments)

(Reporter)

Description

4 years ago
Some mochitests, such as test_layerization [1], rely on APZ being enabled.

Currently they check for this by checking the layers.async-pan-zoom.enabled pref directly [2].

However, this isn't completely accurate, because inside Gecko, the things they rely on are actually conditioned on gfxPlatform::AsyncPanZoomEnabled(), which on some platforms additionally checks for e10s being enabled.

To solve this, we should expose gfxPlatform::AsyncPanZoomEnabled() to mochitests (e.g. via nsIDOMWindowUtils), and check for that instead.

[1] http://mxr.mozilla.org/mozilla-central/source/gfx/layers/apz/test/test_layerization.html?rev=148e25920467
[2] http://mxr.mozilla.org/mozilla-central/source/gfx/layers/apz/test/test_layerization.html?force=1#140
[3] http://mxr.mozilla.org/mozilla-central/source/gfx/thebes/gfxPlatform.cpp#2408
Assignee: nobody → bugmail.mozilla
Created attachment 8631169 [details] [diff] [review]
Part 1 - Add a DWU function
Attachment #8631169 - Flags: review?(botond)
Created attachment 8631170 [details] [diff] [review]
Part 2 - Update test_layerization

Tested locally on OS X to ensure this works as expected.
Attachment #8631170 - Flags: review?(botond)
(Reporter)

Updated

4 years ago
Attachment #8631169 - Flags: review?(botond) → review+
(Reporter)

Comment 3

4 years ago
Comment on attachment 8631170 [details] [diff] [review]
Part 2 - Update test_layerization

Review of attachment 8631170 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!
Attachment #8631170 - Flags: review?(botond) → review+
https://hg.mozilla.org/mozilla-central/rev/68ca22f61c97
https://hg.mozilla.org/mozilla-central/rev/264521d3ef29
Status: NEW → RESOLVED
Last Resolved: 4 years ago
status-firefox42: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.