Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Errors
- This test gets skipped with pattern: os == 'linux' && os_version == '22.04' && display == 'wayland'
- This test failed 3 times in the preceding 30 days. quicksearch this test
- Manifest: gfx/layers/apz/test/mochitest/mochitest.toml
<!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],
];
var wheel_transaction_prefs = [
  ["dom.event.wheel-event-groups.enabled", true],
  ["mousewheel.transaction.timeout", 10000],
  ["apz.test.mac.synth_wheel_input", true],
  ...getSmoothScrollPrefs("wheel"),
];
// 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},
  {"file": "helper_scroll_over_subframe.html?scroll=wheel", prefs: wheel_transaction_prefs},
  {"file": "helper_scroll_over_subframe.html?oop=true&scroll=wheel", prefs: wheel_transaction_prefs},
  {"file": "helper_custom_scrolling_bug1932985.html", prefs: [
    ["general.smoothScroll", true],
    ...smoothness_prefs
  ]},
  {"file": "helper_custom_scrolling_bug1932985.html?touchpad", prefs: [
    ["general.smoothScroll", true],
    ...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}
  );
} else if (getPlatform() == "mac") {
  subtests.push(...[
    {"file": "helper_scroll_over_subframe.html?scroll=pan", prefs: wheel_transaction_prefs},
    {"file": "helper_scroll_over_subframe.html?oop=true&scroll=pan", prefs: wheel_transaction_prefs},
  ]);
}
if (isApzEnabled()) {
  SimpleTest.waitForExplicitFinish();
  window.onload = function() {
    runSubtestsSeriallyInFreshWindows(subtests)
    .then(SimpleTest.finish, SimpleTest.finishWithFailure);
  };
}
  </script>
</head>
<body>
</body>
</html>