summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/touch-events/single-touch-vertical-rl.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /testing/web-platform/tests/touch-events/single-touch-vertical-rl.html
parentInitial commit. (diff)
downloadthunderbird-upstream.tar.xz
thunderbird-upstream.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/touch-events/single-touch-vertical-rl.html')
-rw-r--r--testing/web-platform/tests/touch-events/single-touch-vertical-rl.html53
1 files changed, 53 insertions, 0 deletions
diff --git a/testing/web-platform/tests/touch-events/single-touch-vertical-rl.html b/testing/web-platform/tests/touch-events/single-touch-vertical-rl.html
new file mode 100644
index 0000000000..857007b1f8
--- /dev/null
+++ b/testing/web-platform/tests/touch-events/single-touch-vertical-rl.html
@@ -0,0 +1,53 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>Touch events with vertical-rl writing mode</title>
+ <meta name="viewport" content="width=device-width">
+ <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>
+ setup({explicit_done: true});
+
+ async function run() {
+ document.documentElement.addEventListener("touchstart", function onTouchStart(event) {
+ test(function() {
+ assert_equals(event.changedTouches[0].clientX, 10, "clientX");
+ assert_equals(event.changedTouches[0].clientY, 20, "clientY");
+ }, "touchstart client coordinates are correct in vertical-rl");
+ });
+
+ document.documentElement.addEventListener("click", function onClick(event) {
+ test(function() {
+ assert_equals(event.clientX, 10, "clientX");
+ assert_equals(event.clientY, 20, "clientY");
+ }, "click client coordinates are correct in vertical-rl");
+ done();
+ });
+
+ let actions = new test_driver.Actions()
+ .addPointer("touchPointer1", "touch")
+ .pointerMove(10, 20)
+ .pointerDown()
+ .pointerUp();
+ actions.send();
+ }
+ </script>
+ <style>
+ body {
+ margin: 0;
+ writing-mode: vertical-rl;
+ }
+ .forcescroll {
+ width: 5000px;
+ height: 20px;
+ }
+ </style>
+</head>
+<body onload="run()">
+ <div class="forcescroll"></div>
+</body>
+</html> \ No newline at end of file