summaryrefslogtreecommitdiffstats
path: root/dom/events/test/pointerevents/test_bug1725416.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /dom/events/test/pointerevents/test_bug1725416.html
parentInitial commit. (diff)
downloadfirefox-upstream/124.0.1.tar.xz
firefox-upstream/124.0.1.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/events/test/pointerevents/test_bug1725416.html')
-rw-r--r--dom/events/test/pointerevents/test_bug1725416.html37
1 files changed, 37 insertions, 0 deletions
diff --git a/dom/events/test/pointerevents/test_bug1725416.html b/dom/events/test/pointerevents/test_bug1725416.html
new file mode 100644
index 0000000000..3cc4a6316f
--- /dev/null
+++ b/dom/events/test/pointerevents/test_bug1725416.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Bug 1725416</title>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<script src="/tests/SimpleTest/EventUtils.js"></script>
+<script src="/tests/SimpleTest/paint_listener.js"></script>
+<script src="/tests/gfx/layers/apz/test/mochitest/apz_test_utils.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css" />
+
+<style>
+ #container {
+ height: 100px;
+ touch-action: none;
+ }
+</style>
+
+<div id="container"></div>
+
+<script>
+ add_task(async function testTouch() {
+ await waitUntilApzStable();
+ const container = document.getElementById("container");
+ const pointerDownPromise = promiseOneEvent(container, "pointerdown");
+ const pointerUpPromise = promiseOneEvent(container, "pointerup");
+ synthesizeNativeTapAtCenter(container);
+
+ const pointerDown = await pointerDownPromise;
+ is(pointerDown.pointerType, "touch", ".pointerType");
+ is(pointerDown.button, 0, ".button");
+ is(pointerDown.buttons, 1, ".buttons");
+
+ const pointerUp = await pointerUpPromise;
+ is(pointerUp.pointerType, "touch", ".pointerType");
+ is(pointerUp.button, 0, ".button");
+ is(pointerUp.buttons, 0, ".buttons");
+ });
+</script>