Backed out changeset f946717df0fd (bug 1863194) for causing wd failures @ webdriver...
[gecko.git] / gfx / layers / apz / test / mochitest / test_group_wheelevents.html
blob42ce15a247d598270bf7902070237f23aadf8cf8
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>Various wheel-scrolling tests that spawn in new windows</title>
6 <script src="/tests/SimpleTest/SimpleTest.js"></script>
7 <script type="application/javascript" src="apz_test_utils.js"></script>
8 <script type="application/javascript" src="apz_test_native_event_utils.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
10 <script type="application/javascript">
12 var prefs = [
13 // turn off smooth scrolling so that we don't have to wait for
14 // APZ animations to finish before sampling the scroll offset
15 ["general.smoothScroll", false],
16 // ensure that any mouse movement will trigger a new wheel transaction,
17 // because in this test we move the mouse a bunch and want to recalculate
18 // the target APZC after each such movement.
19 ["mousewheel.transaction.ignoremovedelay", 0],
20 ["mousewheel.transaction.timeout", 0],
23 // For helper_scroll_over_scrollbar, we need to set a pref to force
24 // layerization of the scrollbar track to reproduce the bug being fixed.
25 // Otherwise, the bug only manifests with overlay scrollbars on macOS,
26 // or in a XUL RCD, both of which are hard to materialize in a test.
27 var scrollbar_prefs = prefs.slice(); // make a copy
28 scrollbar_prefs.push(["layout.scrollbars.always-layerize-track", true]);
30 // For helper_overscroll_behavior_bug1425573, we need to set the APZ content
31 // response timeout to 0, so we exercise the fallback codepath.
32 var timeout_prefs = prefs.slice(); // make a copy
33 timeout_prefs.push(["apz.content_response_timeout", 0]);
35 var smoothness_prefs = getSmoothScrollPrefs("wheel");
37 var subtests = [
38 {"file": "helper_scroll_on_position_fixed.html", "prefs": prefs},
39 {"file": "helper_bug1271432.html", "prefs": prefs},
40 {"file": "helper_overscroll_behavior_bug1425573.html", "prefs": timeout_prefs},
41 {"file": "helper_overscroll_behavior_bug1425603.html", "prefs": prefs},
42 {"file": "helper_overscroll_behavior_bug1494440.html", "prefs": prefs},
43 {"file": "helper_scroll_inactive_perspective.html", "prefs": prefs},
44 {"file": "helper_scroll_inactive_zindex.html", "prefs": prefs},
45 {"file": "helper_scroll_over_scrollbar.html", "prefs": scrollbar_prefs},
46 {"file": "helper_scroll_tables_perspective.html", "prefs": prefs},
47 {"file": "helper_transform_end_on_wheel_scroll.html",
48 prefs: [["general.smoothScroll", false],
49 ["apz.test.mac.synth_wheel_input", true]]},
50 {"file": "helper_scroll_anchoring_on_wheel.html", prefs: smoothness_prefs},
53 subtests.push(...buildRelativeScrollSmoothnessVariants("wheel", ["scrollBy", "scrollTo", "scrollTop"]));
55 // Only Windows has the test api implemented for this test.
56 if (getPlatform() == "windows") {
57 subtests.push(
58 {"file": "helper_dommousescroll.html", "prefs": prefs}
62 if (isApzEnabled()) {
63 SimpleTest.waitForExplicitFinish();
64 window.onload = function() {
65 runSubtestsSeriallyInFreshWindows(subtests)
66 .then(SimpleTest.finish, SimpleTest.finishWithFailure);
70 </script>
71 </head>
72 <body>
73 </body>
74 </html>