summaryrefslogtreecommitdiffstats
path: root/gfx/layers/apz/test/mochitest/test_group_checkerboarding.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /gfx/layers/apz/test/mochitest/test_group_checkerboarding.html
parentInitial commit. (diff)
downloadfirefox-esr-upstream.tar.xz
firefox-esr-upstream.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/layers/apz/test/mochitest/test_group_checkerboarding.html')
-rw-r--r--gfx/layers/apz/test/mochitest/test_group_checkerboarding.html83
1 files changed, 83 insertions, 0 deletions
diff --git a/gfx/layers/apz/test/mochitest/test_group_checkerboarding.html b/gfx/layers/apz/test/mochitest/test_group_checkerboarding.html
new file mode 100644
index 0000000000..5386ffd740
--- /dev/null
+++ b/gfx/layers/apz/test/mochitest/test_group_checkerboarding.html
@@ -0,0 +1,83 @@
+<!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>
+ <script type="application/javascript" src="apz_test_native_event_utils.js"></script>
+ <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript">
+ if (isApzEnabled()) {
+ SimpleTest.waitForExplicitFinish();
+
+
+ var prefs = [
+ ["apz.test.logging_enabled", true],
+ ["apz.displayport_expiry_ms", 0],
+ ["general.smoothScroll", false],
+ // Avoid extra paints from scrollbar fading out
+ ["layout.testing.overlay-scrollbars.always-visible", true],
+ ];
+
+ var px_ratio_1_prefs = [
+ ...prefs,
+ ["layout.css.devPixelsPerPx", 1.0],
+ ];
+
+ var zoom_and_pan_prefs = [
+ ...prefs,
+ ...getPrefs("TOUCH_EVENTS:PAN"),
+ ];
+
+ var no_multiplier_prefs = [
+ ...zoom_and_pan_prefs,
+ ["apz.x_skate_size_multiplier", "0.0"],
+ ["apz.y_skate_size_multiplier", "0.0"],
+ ["apz.x_stationary_size_multiplier", "0.0"],
+ ["apz.y_stationary_size_multiplier", "0.0"],
+ ];
+
+ var subtests = [
+ { file: "helper_checkerboard_apzforcedisabled.html", prefs },
+ { file: "helper_checkerboard_scrollinfo.html", prefs },
+ { file: "helper_horizontal_checkerboard.html", "prefs": px_ratio_1_prefs },
+ { file: "helper_checkerboard_no_multiplier.html", "prefs": no_multiplier_prefs },
+ { file: "helper_checkerboard_zoom_during_load.html", "prefs": no_multiplier_prefs },
+ { file: "helper_wide_crossorigin_iframe.html", prefs },
+ { file: "helper_reset_zoom_bug1818967.html", prefs },
+ ];
+
+ let platform = getPlatform();
+ if (platform != "windows") {
+ subtests.push(
+ { file: "helper_checkerboard_zoomoverflowhidden.html", "prefs": zoom_and_pan_prefs }
+ );
+ }
+
+ var scrollbarbutton_prefs = [
+ ...prefs,
+ ["general.smoothScroll", true],
+ // bug 1682919 only affects the main thread scrollbar button repeat codepath
+ ["apz.scrollbarbuttonrepeat.enabled", false]
+ ];
+
+ // Only Windows has scrollbar buttons in automation.
+ if (platform == "windows") {
+ subtests.push(
+ { file: "helper_scrollbarbuttonclick_checkerboard.html", "prefs": scrollbarbutton_prefs},
+ );
+ }
+
+ // 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>