diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /gfx/layers/apz/test/mochitest/test_group_touchevents-2.html | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | gfx/layers/apz/test/mochitest/test_group_touchevents-2.html | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/gfx/layers/apz/test/mochitest/test_group_touchevents-2.html b/gfx/layers/apz/test/mochitest/test_group_touchevents-2.html new file mode 100644 index 0000000000..decd615795 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/test_group_touchevents-2.html @@ -0,0 +1,69 @@ +<!DOCTYPE HTML> +<html> +<head> + <meta charset="utf-8"> + <title>Various touch tests that spawn in new windows (2)</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"> + +var isWindows = getPlatform() == "windows"; + +const shared_prefs = [ + ["apz.test.fails_with_native_injection", isWindows], + ["dom.w3c_touch_events.legacy_apis.enabled", true], +]; + +var subtests = [ + // Taps on media elements to make sure the touchend event is delivered + // properly. We increase the long-tap timeout to ensure it doesn't get trip + // during the tap. + // Also this test (on Windows) cannot satisfy the OS requirement of providing + // an injected touch event every 100ms, because it waits for a paint between + // the touchstart and the touchend, so we have to use the "fake injection" + // code instead. + {"file": "helper_bug1162771.html", "prefs": [...shared_prefs, + ["ui.click_hold_context_menus.delay", 10000]]}, + + // As with the previous test, this test cannot inject touch events every 100ms + // because it waits for a long-tap, so we have to use the "fake injection" code + // instead. + // This test also disables synthesized mousemoves from reflow so it can make + // more precise assertions about the order in which events arrive. + {"file": "helper_long_tap.html", "prefs": [...shared_prefs, + ["layout.reflow.synthMouseMove", false]]}, + + // For the following tests, we want to make sure APZ doesn't wait for a content + // response that is never going to arrive. To detect this we set the content response + // timeout to a day, so that the entire test times out and fails if APZ does + // end up waiting. + {"file": "helper_tap_passive.html", "prefs": [...shared_prefs, + ["apz.content_response_timeout", 24 * 60 * 60 * 1000]]}, + + {"file": "helper_tap_default_passive.html", "prefs": [...shared_prefs, + ["apz.content_response_timeout", 24 * 60 * 60 * 1000]]}, + + // Add new subtests to test_group_touch_events-4.html, not this file. +]; + +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> |