Closed Bug 1181678 Opened 9 years ago Closed 9 years ago

Allow mochitests to accurately determine if APZ is enabled

Categories

(Core :: Panning and Zooming, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: botond, Assigned: kats)

References

Details

Attachments

(2 files)

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
Tested locally on OS X to ensure this works as expected.
Attachment #8631170 - Flags: review?(botond)
Attachment #8631169 - Flags: review?(botond) → review+
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+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: