Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Errors
- This test gets skipped with pattern: os == 'linux' && os_version == '22.04' && arch == 'x86_64' && debug && verify-standalone OR os == 'linux' && os_version == '24.04' && processor == 'x86_64' && display == 'x11' && debug
- This test failed 36 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 touch tests that spawn in new windows (6)</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <script type="application/javascript" src="apz_test_native_event_utils.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 hover_test_prefs = [
  // Shorten touch_hover.delay_ms to set :hover state without any delay.
  ["ui.touch_hover.delay_ms", 0],
  // Synthesizing mousemove on reflow causes unexpected :hover state
  // while the page is loading.
  ["layout.reflow.synthMouseMove", false],
  // Avoid opening contextmenu.
  ["ui.click_hold_context_menus.delay", 10000]
];
var subtests = [
  {"file": "helper_event_during_fast_fling.html",
   "prefs": [["apz.touch_start_tolerance", "0.0"],
             ["apz.android.chrome_fling_physics.friction", "0.0001"],
             ["apz.fling_friction", "0.0001"],
             ["apz.fling_stopped_threshold", "0"],
             ["apz.velocity_relevance_time_ms", "1000"],
             ["apz.fling_min_velocity_threshold", "0.0"]]},
  {"file": "helper_no_synth_mousemove_after_pan.html",
   "prefs": [["layout.reflow.synthMouseMove", true],
             // Avoid to the pan gesture is treated as  on-touch-pinch-zoom gesture on Android.
             ["apz.max_tap_time", 0],
             ...getPrefs("TOUCH_EVENTS:PAN")]},
  {"file": "helper_hover_state.html", "prefs": hover_test_prefs},
  {"file": "helper_hover_state_with_touch_action_none.html", "prefs": hover_test_prefs},
  {"file": "helper_hover_state_with_event_listener.html", "prefs": hover_test_prefs},
  {"file": "helper_hover_state_with_prevent_default_on_touchmove.html", "prefs": hover_test_prefs},
  {"file": "helper_hover_state_while_scroll.html", "prefs": [
    ...hover_test_prefs,
    ["apz.touch_start_tolerance", "0.0"]
  ]},
  {"file": "helper_hover_state_with_prevent_default_on_touchstart.html", "prefs": hover_test_prefs},
  // These two tests check whether each scheduled :hover or :active task
  // will not leak when the target document is destroyed.
  {"file": "helper_cancel_active_task.html",
   "prefs": [["ui.touch_active.delay_ms", 10000],
             ["ui.click_hold_context_menus.delay", 1000000],
             ["test.events.async.enabled", true]
   ]},
  {"file": "helper_cancel_hover_task.html",
   "prefs": [["ui.touch_hover.delay_ms", 10000],
             ["ui.click_hold_context_menus.delay", 1000000],
             ["test.events.async.enabled", true]
   ]},
  // Add new subtests here. If this starts timing out because it's taking too
  // long, create a test_group_touchevents-7.html file. Refer to 1423011#c57
  // for more details.
];
if (isApzEnabled()) {
  ok(window.TouchEvent, "Check if TouchEvent is supported (it should be, the test harness forces it on everywhere)");
  if (getPlatform() == "android") {
    // This has a lot of subtests, and Android emulators are slow.
    SimpleTest.requestLongerTimeout(2);
  }
  SimpleTest.waitForExplicitFinish();
  window.onload = function() {
    runSubtestsSeriallyInFreshWindows(subtests)
    .then(SimpleTest.finish, SimpleTest.finishWithFailure);
  };
}
  </script>
</head>
<body>
</body>
</html>