summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/infrastructure/testdriver/actions/multiTouchPointsReleaseFirstPoint.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/infrastructure/testdriver/actions/multiTouchPointsReleaseFirstPoint.html
parentInitial commit. (diff)
downloadfirefox-upstream.tar.xz
firefox-upstream.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/infrastructure/testdriver/actions/multiTouchPointsReleaseFirstPoint.html')
-rw-r--r--testing/web-platform/tests/infrastructure/testdriver/actions/multiTouchPointsReleaseFirstPoint.html56
1 files changed, 56 insertions, 0 deletions
diff --git a/testing/web-platform/tests/infrastructure/testdriver/actions/multiTouchPointsReleaseFirstPoint.html b/testing/web-platform/tests/infrastructure/testdriver/actions/multiTouchPointsReleaseFirstPoint.html
new file mode 100644
index 0000000000..41027beb67
--- /dev/null
+++ b/testing/web-platform/tests/infrastructure/testdriver/actions/multiTouchPointsReleaseFirstPoint.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>TestDriver actions: two touch points with one moving one pause</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<script src="touchEvents.js"></script>
+
+<style>
+div#test1{
+ position: fixed;
+ touch-action: none;
+ top: 0;
+ left: 0;
+ width: 100px;
+ height: 100px;
+ background-color: blue;
+}
+
+</style>
+
+<div id="test1">
+</div>
+
+<script>
+promise_test(async t => {
+ let test1 = document.getElementById("test1");
+ const events = [];
+ addPointerEventListeners(t, test1, events);
+
+ await new test_driver.Actions()
+ .addPointer("touchPointer1", "touch")
+ .addPointer("touchPointer2", "touch")
+ .pointerMove(0, 0, {origin: test1, sourceName: "touchPointer1"})
+ .pointerMove(10, 0, {origin: test1, sourceName: "touchPointer2"})
+ .pointerDown({sourceName: "touchPointer1"})
+ .pointerDown({sourceName: "touchPointer2"})
+ .pointerUp({sourceName: "touchPointer1"})
+ .pointerMove(10, 10, {origin: test1, sourceName: "touchPointer2"})
+ .pointerUp({sourceName: "touchPointer2"})
+ .send();
+
+ const expected = [{type: "pointerdown", pointerId: 2, clientX: 50, clientY: 50},
+ {type: "pointerdown", pointerId: 3, clientX: 60, clientY: 50},
+ {type: "pointerup", pointerId: 2},
+ {type: "pointermove", pointerId: 3, clientX: 60, clientY:60},
+ {type: "pointerup", pointerId: 3}];
+
+ assert_equals(events.length, expected.length, "Expected number of events");
+ for (let i=0; i<expected.length; i++) {
+ eventEquals(events[i], expected[i]);
+ }
+});
+</script>