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 5 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 tests for scroll snap</title>
  <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 = [
  ["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],
];
const subtests = [
  {"file": "helper_scroll_snap_no_valid_snap_position.html", "prefs": prefs},
  {"file": "helper_bug1960053_scroll_snap_align_start.html",
   "prefs": [["apz.test.mac.synth_wheel_input", true]]},
  {"file": "helper_scroll_snap_resnap_after_async_scroll.html",
    // Specify a small `layout.css.scroll-behavior.spring-constant` value to
    // keep the smooth scroll animation running long enough so that we can
    // trigger a reflow during the animation.
   "prefs": [["layout.css.scroll-behavior.spring-constant", 10],
             ["apz.test.mac.synth_wheel_input", true]]},
  {"file": "helper_scroll_snap_resnap_after_async_scroll.html",
    "prefs": [["general.smoothScroll", false],
             ["apz.test.mac.synth_wheel_input", true]]},
  {"file": "helper_scroll_snap_resnap_after_async_scrollBy.html",
    // Same as above helper_scroll_snap_resnap_after_async_scroll.html.
   "prefs": [["layout.css.scroll-behavior.spring-constant", 10]]},
  {"file": "helper_scroll_snap_not_resnap_during_panning.html",
    // Specify a strong spring constant to make scroll snap animation be
    // effective in a short span of time.
   "prefs": [["layout.css.scroll-behavior.spring-constant", 1000]]},
  {"file": "helper_scroll_snap_not_resnap_during_scrollbar_dragging.html",
    // Same as above helper_scroll_snap_not_resnap_during_scrollbar_dragging.html.
   "prefs": [["layout.css.scroll-behavior.spring-constant", 1000]]},
  {"file": "helper_bug1780701.html"},
  {"file": "helper_bug1783936.html",
             // Shorten the scroll snap animation duration.
   "prefs": [["layout.css.scroll-behavior.spring-constant", 1000],
             // Avoid fling at the end of pan.
             ["apz.fling_min_velocity_threshold", "10000"],
             // This test needs mSimilateMomentum flag on headless mode.
             ["apz.test.headless.simulate_momentum", true],
             ["apz.gtk.kinetic_scroll.enabled", true],
             // Use the pixel mode to make the test predictable easily.
             ["apz.gtk.kinetic_scroll.delta_mode", 2],
             ["apz.gtk.kinetic_scroll.pixel_delta_mode_multiplier", 1]]},
  {"file": "helper_bug1922904.html",
   "prefs": [["apz.test.mac.synth_wheel_input", true]]},
  {"file": "helper_bug1934118.html",
   "prefs": [["apz.test.mac.synth_wheel_input", true]]},
];
if (isApzEnabled()) {
  SimpleTest.waitForExplicitFinish();
  window.onload = function() {
    runSubtestsSeriallyInFreshWindows(subtests)
    .then(SimpleTest.finish, SimpleTest.finishWithFailure);
  };
}
  </script>
</head>
<body>
</body>
</html>