Bug 1608506 - Split helper_basic_double_tap_zoom.html out into its own test group which only runs on mobile. r=hiro

This test needs mobile viewport sizing because we gate double tap zooming on that.

Differential Revision: https://phabricator.services.mozilla.com/D59590

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Botond Ballo 2020-01-14 00:22:55 +00:00
Родитель 8691f729dc
Коммит a5c84444c5
3 изменённых файлов: 38 добавлений и 15 удалений

Просмотреть файл

@ -41,6 +41,8 @@
skip-if = (os == 'win') # see bug 1495580 for Windows
[test_group_zoom-2.html]
skip-if = (os == 'win') # see bug 1495580 for Windows
[test_group_double_tap_zoom.html]
run-if = (os == 'android') # FIXME: enable on desktop (see bug 1608506 comment 4)
[test_interrupted_reflow.html]
[test_group_keyboard.html]
[test_layerization.html]

Просмотреть файл

@ -0,0 +1,36 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Various zoom-related tests that spawn in new windows</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="apz_test_utils.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script type="application/javascript">
// Increase the tap timeouts so the double-tap is still detected in case of
// random delays during testing.
var doubletap_prefs = [
["ui.click_hold_context_menus.delay", 10000],
["apz.max_tap_time", 10000],
];
var subtests = [
{"file": "helper_basic_doubletap_zoom.html", "prefs": doubletap_prefs},
];
if (isApzEnabled()) {
// This has a lot of subtests, and Android emulators are slow.
SimpleTest.requestLongerTimeout(2);
SimpleTest.waitForExplicitFinish();
window.onload = function() {
runSubtestsSeriallyInFreshWindows(subtests)
.then(SimpleTest.finish, SimpleTest.finish);
};
}
</script>
</head>
<body>
</body>
</html>

Просмотреть файл

@ -34,20 +34,6 @@ var prefs = [
["apz.content_response_timeout", 60000],
];
var meta_viewport_prefs = [
...prefs,
// Some tests use mobile viewport sizing, enable it even on desktop.
["dom.meta-viewport.enabled", true],
];
// Increase the tap timeouts so the double-tap is still detected in case of
// random delays during testing.
var doubletap_prefs = [
...meta_viewport_prefs,
["ui.click_hold_context_menus.delay", 10000],
["apz.max_tap_time", 10000],
];
// Increase the tap timeouts so the one-touch-pinch gesture is still detected
// in case of random delays during testing. Also ensure that the feature is
// actually enabled (which it should be by default, but it's good to be safe).
@ -64,7 +50,6 @@ var subtests = [
{"file": "helper_zoom_prevented.html", "prefs": prefs},
{"file": "helper_zoomed_pan.html", "prefs": prefs},
{"file": "helper_fixed_position_scroll_hittest.html", "prefs": prefs},
{"file": "helper_basic_doubletap_zoom.html", "prefs": doubletap_prefs},
{"file": "helper_onetouchpinch_nested.html", "prefs": onetouchpinch_prefs},
{"file": "helper_visual_smooth_scroll.html", "prefs": prefs},
{"file": "helper_scroll_into_view_bug1516056.html", "prefs": prefs},