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/helper_touch_action_ordering_block.html | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/layers/apz/test/mochitest/helper_touch_action_ordering_block.html')
-rw-r--r-- | gfx/layers/apz/test/mochitest/helper_touch_action_ordering_block.html | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/gfx/layers/apz/test/mochitest/helper_touch_action_ordering_block.html b/gfx/layers/apz/test/mochitest/helper_touch_action_ordering_block.html new file mode 100644 index 0000000000..ca593c0db5 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_touch_action_ordering_block.html @@ -0,0 +1,39 @@ +<!DOCTYPE HTML> +<html> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width; initial-scale=1.0"> + <title>Touch-action with sorted element</title> + <script type="application/javascript" src="apz_test_native_event_utils.js"></script> + <script type="application/javascript" src="apz_test_utils.js"></script> + <script type="application/javascript" src="/tests/SimpleTest/paint_listener.js"></script> + <script type="application/javascript"> + async function test() { + var target = document.getElementById("target"); + let touchEndPromise = promiseTouchEnd(document.body); + + // drag the page up to scroll down by 50px + ok(await synthesizeNativeTouchDrag(target, 10, 100, 0, -50), + "Synthesized native vertical drag, waiting for touch-end event..."); + await touchEndPromise; + + await promiseOnlyApzControllerFlushed(); + + is(window.scrollX, 0, "X scroll offset didn't change"); + is(window.scrollY, 50, "Y scroll offset changed"); + } + + waitUntilApzStable() + .then(test) + .then(subtestDone); + </script> +</head> +<body style="border: solid 1px green"> + <div id="spacer" style="height: 2000px"> + <div style="width:200px; height:200px; background-color:blue"> + <span id="target" style="display:inline-block; width:200px; height:200px; background-color:red;"></span> + </div> + <div style="width:200px; height:200px; background-color:orange; touch-action:none; margin-top:-200px;"></div> + </div> +</body> +</html> |