mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
Bug 1459260 - Don't use dom.meta-viewport.enabled in tests that don't need it. r=kats
Many tests only had it enabled because it was required for zooming to work on desktop. This patch revises tests to only use it if they actually use a non- default meta viewport tag. The motivation is to bring test coverage closer to the platform defaults (so on desktop, tests will run with dom.meta-viewport.enabled=false, and on Android with dom.meta-viewport.enabled=true, matching the production scenarios). Depends on D30988 Differential Revision: https://phabricator.services.mozilla.com/D30989 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
1e0a063846
commit
bf20fd9f38
@ -801,8 +801,6 @@ function getPrefs(ident) {
|
||||
// position is synced back to the main thread. So we disable displayport
|
||||
// expiry for these tests.
|
||||
["apz.displayport_expiry_ms", 0],
|
||||
// All of test cases should define viewport meta tag.
|
||||
["dom.meta-viewport.enabled", true],
|
||||
];
|
||||
case "TOUCH_ACTION":
|
||||
return [
|
||||
|
@ -27,8 +27,8 @@ const prefs = [
|
||||
// Explicitly enable pinch-zooming, so this test can run on desktop
|
||||
// even though zooming isn't enabled by default on desktop yet.
|
||||
["apz.allow_zooming", true],
|
||||
// Pinch-zooming currently requires meta viewport support (this requirement
|
||||
// will eventually be removed).
|
||||
// Similarly, explicitly enable support for meta viewport tags (which the
|
||||
// test cases use) so they're processed even on desktop.
|
||||
["dom.meta-viewport.enabled", true],
|
||||
// We use the Visual Viewport API to tell the visual viewport offset.
|
||||
["dom.visualviewport.enabled", true],
|
||||
|
@ -13,7 +13,6 @@ var isWindows = getPlatform() == "windows";
|
||||
|
||||
const shared_prefs = [
|
||||
["apz.test.fails_with_native_injection", isWindows],
|
||||
["dom.meta-viewport.enabled", true],
|
||||
["dom.w3c_touch_events.legacy_apis.enabled", true],
|
||||
];
|
||||
|
||||
|
@ -10,10 +10,11 @@
|
||||
<script type="application/javascript">
|
||||
|
||||
var touch_action_prefs = getPrefs("TOUCH_ACTION");
|
||||
var with_meta_viewport = [...touch_action_prefs, ["dom.meta-viewport.enabled", true]];
|
||||
|
||||
var subtests = [
|
||||
// Simple test to exercise touch-action CSS property
|
||||
{"file": "helper_touch_action.html", "prefs": touch_action_prefs},
|
||||
{"file": "helper_touch_action.html", "prefs": with_meta_viewport},
|
||||
// More complex touch-action tests, with overlapping regions and such
|
||||
{"file": "helper_touch_action_complex.html", "prefs": touch_action_prefs},
|
||||
// Tests that touch-action CSS properties are handled in APZ without waiting
|
||||
|
@ -9,14 +9,14 @@
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="application/javascript">
|
||||
|
||||
var basic_pan_prefs = getPrefs("TOUCH_EVENTS:PAN");
|
||||
var touch_action_prefs = getPrefs("TOUCH_ACTION");
|
||||
|
||||
var subtests = [
|
||||
// clicking on element with :active::after CSS property
|
||||
{"file": "helper_bug1473108.html", "prefs": [["dom.meta-viewport.enabled", true]]},
|
||||
{"file": "helper_bug1473108.html"},
|
||||
// Resetting isFirstPaint shouldn't clobber the visual viewport
|
||||
{"file": "helper_bug1509575.html", "prefs": basic_pan_prefs},
|
||||
{"file": "helper_bug1509575.html", "prefs": [["dom.meta-viewport.enabled", true],
|
||||
...getPrefs("TOUCH_EVENTS:PAN")]},
|
||||
// Exercise one of the main-thread touch-action determination codepaths.
|
||||
{"file": "helper_bug1506497_touch_action_fixed_on_fixed.html", "prefs": touch_action_prefs},
|
||||
// Add new subtests here. If this starts timing out because it's taking too
|
||||
|
@ -18,19 +18,17 @@ var subtests = [
|
||||
{"file": "helper_iframe_pan.html", "prefs": basic_pan_prefs},
|
||||
|
||||
// Simple test to exercise touch-tapping behaviour
|
||||
{"file": "helper_tap.html", "prefs": [["dom.meta-viewport.enabled", true]]},
|
||||
{"file": "helper_tap.html"},
|
||||
// Tapping, but with a full-zoom applied
|
||||
{"file": "helper_tap_fullzoom.html", "prefs": [["dom.meta-viewport.enabled", true]]},
|
||||
{"file": "helper_tap_fullzoom.html"},
|
||||
|
||||
// For the following two tests, disable displayport suppression to make sure it
|
||||
// doesn't interfere with the test by scheduling paints non-deterministically.
|
||||
{"file": "helper_scrollto_tap.html?true",
|
||||
"prefs": [["apz.paint_skipping.enabled", true],
|
||||
["dom.meta-viewport.enabled", true]],
|
||||
"prefs": [["apz.paint_skipping.enabled", true]],
|
||||
"dp_suppression": false},
|
||||
{"file": "helper_scrollto_tap.html?false",
|
||||
"prefs": [["apz.paint_skipping.enabled", false],
|
||||
["dom.meta-viewport.enabled", true]],
|
||||
"prefs": [["apz.paint_skipping.enabled", false]],
|
||||
"dp_suppression": false},
|
||||
|
||||
// Add new subtests to test_group_touch_events-4.html, not this file.
|
||||
|
@ -29,8 +29,8 @@ var prefs = [
|
||||
// Explicitly enable pinch-zooming, so this test can run on desktop
|
||||
// even though zooming isn't enabled by default on desktop yet.
|
||||
["apz.allow_zooming", true],
|
||||
// Pinch-zooming currently requires meta viewport support (this requirement
|
||||
// will eventually be removed).
|
||||
// Similarly, explicitly enable support for meta viewport tags (which the
|
||||
// test cases use) so they're processed even on desktop.
|
||||
["dom.meta-viewport.enabled", true],
|
||||
// Increase the content response timeout because some tests do preventDefault
|
||||
// and we want to make sure APZ actually waits for them.
|
||||
|
Loading…
Reference in New Issue
Block a user