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_keyboard.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 'gfx/layers/apz/test/mochitest/test_group_keyboard.html')
-rw-r--r-- | gfx/layers/apz/test/mochitest/test_group_keyboard.html | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/gfx/layers/apz/test/mochitest/test_group_keyboard.html b/gfx/layers/apz/test/mochitest/test_group_keyboard.html new file mode 100644 index 0000000000..4f1bc0d869 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/test_group_keyboard.html @@ -0,0 +1,60 @@ +<!DOCTYPE HTML> +<html> +<head> + <meta charset="utf-8"> + <title>Various keyboard scrolling tests</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 smoothness_prefs = [ + ["apz.test.logging_enabled", true], + // The default verticalScrollDistance (which is 3) is too small for native + // keyboard scrolling, it sometimes produces same scroll offsets in the early + // stages of the smooth animation. + ["toolkit.scrollbox.verticalScrollDistance", 5], + // Use a longer animation duration to avoid the situation that the + // animation stops accidentally in between each arrow down key press. + // If the situation happens, scroll offsets will not change at the moment. + ["general.smoothScroll.lines.durationMaxMS", 1500], + ["general.smoothScroll.lines.durationMinMS", 1500] +]; + +var subtests = [ + {"file": "helper_key_scroll.html", prefs: [["apz.test.logging_enabled", true], + ["test.events.async.enabled", true]]}, + {"file": "helper_bug1674935.html", prefs: []}, + {"file": "helper_bug1719330.html", prefs: [["general.smoothScroll", false]]}, + {"file": "helper_relative_scroll_smoothness.html?input-type=key&scroll-method=scrollBy", + prefs: smoothness_prefs }, + {"file": "helper_relative_scroll_smoothness.html?input-type=native-key&scroll-method=scrollBy", + prefs: smoothness_prefs }, + {"file": "helper_relative_scroll_smoothness.html?input-type=native-key&scroll-method=scrollTo", + prefs: smoothness_prefs }, + {"file": "helper_relative_scroll_smoothness.html?input-type=native-key&scroll-method=scrollTop", + prefs: smoothness_prefs }, + {"file": "helper_bug1695598.html"}, + {"file": "helper_scroll_snap_on_page_down_scroll.html"}, + {"file": "helper_scroll_snap_on_page_down_scroll.html", + prefs: [["test.events.async.enabled", true]]}, + {"file": "helper_transform_end_on_keyboard_scroll.html", + prefs: [["general.smoothScroll", false]] }, +]; + +if (isKeyApzEnabled()) { + SimpleTest.waitForExplicitFinish(); + window.onload = function() { + runSubtestsSeriallyInFreshWindows(subtests) + .then(SimpleTest.finish, SimpleTest.finishWithFailure); + }; +} else { + SimpleTest.ok(true, "Keyboard APZ is disabled"); +} + </script> +</head> +<body> + <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1383365">Async key scrolling test</a> +</body> +</html> |