summaryrefslogtreecommitdiffstats
path: root/gfx/layers/apz/test/mochitest/test_group_wheelevents.html
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/layers/apz/test/mochitest/test_group_wheelevents.html')
-rw-r--r--gfx/layers/apz/test/mochitest/test_group_wheelevents.html74
1 files changed, 74 insertions, 0 deletions
diff --git a/gfx/layers/apz/test/mochitest/test_group_wheelevents.html b/gfx/layers/apz/test/mochitest/test_group_wheelevents.html
new file mode 100644
index 0000000000..42ce15a247
--- /dev/null
+++ b/gfx/layers/apz/test/mochitest/test_group_wheelevents.html
@@ -0,0 +1,74 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <meta charset="utf-8">
+ <title>Various wheel-scrolling tests that spawn in new windows</title>
+ <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">
+
+var prefs = [
+ // turn off smooth scrolling so that we don't have to wait for
+ // APZ animations to finish before sampling the scroll offset
+ ["general.smoothScroll", false],
+ // ensure that any mouse movement will trigger a new wheel transaction,
+ // because in this test we move the mouse a bunch and want to recalculate
+ // the target APZC after each such movement.
+ ["mousewheel.transaction.ignoremovedelay", 0],
+ ["mousewheel.transaction.timeout", 0],
+];
+
+// For helper_scroll_over_scrollbar, we need to set a pref to force
+// layerization of the scrollbar track to reproduce the bug being fixed.
+// Otherwise, the bug only manifests with overlay scrollbars on macOS,
+// or in a XUL RCD, both of which are hard to materialize in a test.
+var scrollbar_prefs = prefs.slice(); // make a copy
+scrollbar_prefs.push(["layout.scrollbars.always-layerize-track", true]);
+
+// For helper_overscroll_behavior_bug1425573, we need to set the APZ content
+// response timeout to 0, so we exercise the fallback codepath.
+var timeout_prefs = prefs.slice(); // make a copy
+timeout_prefs.push(["apz.content_response_timeout", 0]);
+
+var smoothness_prefs = getSmoothScrollPrefs("wheel");
+
+var subtests = [
+ {"file": "helper_scroll_on_position_fixed.html", "prefs": prefs},
+ {"file": "helper_bug1271432.html", "prefs": prefs},
+ {"file": "helper_overscroll_behavior_bug1425573.html", "prefs": timeout_prefs},
+ {"file": "helper_overscroll_behavior_bug1425603.html", "prefs": prefs},
+ {"file": "helper_overscroll_behavior_bug1494440.html", "prefs": prefs},
+ {"file": "helper_scroll_inactive_perspective.html", "prefs": prefs},
+ {"file": "helper_scroll_inactive_zindex.html", "prefs": prefs},
+ {"file": "helper_scroll_over_scrollbar.html", "prefs": scrollbar_prefs},
+ {"file": "helper_scroll_tables_perspective.html", "prefs": prefs},
+ {"file": "helper_transform_end_on_wheel_scroll.html",
+ prefs: [["general.smoothScroll", false],
+ ["apz.test.mac.synth_wheel_input", true]]},
+ {"file": "helper_scroll_anchoring_on_wheel.html", prefs: smoothness_prefs},
+];
+
+subtests.push(...buildRelativeScrollSmoothnessVariants("wheel", ["scrollBy", "scrollTo", "scrollTop"]));
+
+// Only Windows has the test api implemented for this test.
+if (getPlatform() == "windows") {
+ subtests.push(
+ {"file": "helper_dommousescroll.html", "prefs": prefs}
+ );
+}
+
+if (isApzEnabled()) {
+ SimpleTest.waitForExplicitFinish();
+ window.onload = function() {
+ runSubtestsSeriallyInFreshWindows(subtests)
+ .then(SimpleTest.finish, SimpleTest.finishWithFailure);
+ };
+}
+
+ </script>
+</head>
+<body>
+</body>
+</html>