diff options
Diffstat (limited to 'gfx/layers/apz/test/mochitest/test_group_minimum_scale_size.html')
-rw-r--r-- | gfx/layers/apz/test/mochitest/test_group_minimum_scale_size.html | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/gfx/layers/apz/test/mochitest/test_group_minimum_scale_size.html b/gfx/layers/apz/test/mochitest/test_group_minimum_scale_size.html new file mode 100644 index 0000000000..2de924d6bd --- /dev/null +++ b/gfx/layers/apz/test/mochitest/test_group_minimum_scale_size.html @@ -0,0 +1,48 @@ +<!DOCTYPE HTML> +<html> +<head> +<meta charset="utf-8"> +<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"> +const prefs = [ + // We need the APZ paint logging information + ["apz.test.logging_enabled", true], + // Dropping the touch slop to 0 makes the tests easier to write because + // we can just do a one-pixel drag to get over the pan threshold rather + // than having to hard-code some larger value. + ["apz.touch_start_tolerance", "0.0"], + // The subtests in this test do touch-drags to pan the page, but we don't + // want those pans to turn into fling animations, so we increase the + // fling-min threshold velocity to an arbitrarily large value. + ["apz.fling_min_velocity_threshold", "10000"], + // The helper_bug1280013's div gets a displayport on scroll, but if the + // test takes too long the displayport can expire before we read the value + // out of the test. So we disable displayport expiry for these tests. + ["apz.displayport_expiry_ms", 0], + // 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], +]; + +const subtests = [ + { file: "helper_minimum_scale_1_0.html", prefs }, + { file: "helper_no_scalable_with_initial_scale.html", prefs }, +]; + +if (isApzEnabled()) { + SimpleTest.waitForExplicitFinish(); + // Run the actual test in its own window, because it requires that the + // root APZC be scrollable. Mochitest pages themselves often run + // inside an iframe which means we have no control over the root APZC. + window.onload = () => { + runSubtestsSeriallyInFreshWindows(subtests) + .then(SimpleTest.finish, SimpleTest.finishWithFailure); + }; +} +</script> +</head> +<body> +</body> +</html> |