diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/pointerevents/resources | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.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/pointerevents/resources')
8 files changed, 134 insertions, 0 deletions
diff --git a/testing/web-platform/tests/pointerevents/resources/iframe-touch-action-none-subframe.html b/testing/web-platform/tests/pointerevents/resources/iframe-touch-action-none-subframe.html new file mode 100644 index 0000000000..0a894d4401 --- /dev/null +++ b/testing/web-platform/tests/pointerevents/resources/iframe-touch-action-none-subframe.html @@ -0,0 +1,26 @@ +<html> + <style> + body { + width: 200px; + height: 150px; + padding: 0px; + margin: 0px; + background-color: lightgreen + } + </style> + <body></body> + <script> + function handler(e) { + window.top.postMessage({ + "type": "subframe-event", + "eventType": e.type + }, "*"); + } + + ["pointerup", "pointercancel"].forEach(eventType => { + document.body.addEventListener( + eventType, + handler); + }); + </script> +</html> diff --git a/testing/web-platform/tests/pointerevents/resources/minimal.html b/testing/web-platform/tests/pointerevents/resources/minimal.html new file mode 100644 index 0000000000..9402b95cb1 --- /dev/null +++ b/testing/web-platform/tests/pointerevents/resources/minimal.html @@ -0,0 +1,4 @@ +<body>Minimal HTML</body> +<script> + parent.postMessage({"type": "subframe-loaded"}, "*"); +</script> diff --git a/testing/web-platform/tests/pointerevents/resources/pointerevent_attributes_hoverable_pointers-iframe.html b/testing/web-platform/tests/pointerevents/resources/pointerevent_attributes_hoverable_pointers-iframe.html new file mode 100644 index 0000000000..5e55868282 --- /dev/null +++ b/testing/web-platform/tests/pointerevents/resources/pointerevent_attributes_hoverable_pointers-iframe.html @@ -0,0 +1,10 @@ +<!doctype html> +<html> + <head> + <meta name="viewport" content="width=device-width"> + <link rel="stylesheet" type="text/css" href="../pointerevent_styles.css"> + </head> + <body> + <div id="square2" class="square"></div> + </body> +</html> diff --git a/testing/web-platform/tests/pointerevents/resources/pointerevent_fractional_coordinates-iframe.html b/testing/web-platform/tests/pointerevents/resources/pointerevent_fractional_coordinates-iframe.html new file mode 100644 index 0000000000..5245a3f2e1 --- /dev/null +++ b/testing/web-platform/tests/pointerevents/resources/pointerevent_fractional_coordinates-iframe.html @@ -0,0 +1,32 @@ +<!doctype html> +<html> + <head> + <meta name="viewport" content="width=device-width"> + <link rel="stylesheet" type="text/css" href="../pointerevent_styles.css"> + </head> + <style> + .square { + width: 3px; + height:3px; + background: black; + cursor: pointer; + } + #s1 { + top: 10px; + left: 10px; + } + #s2 { + top: 30px; + left: 50px; + } + #s3 { + top: 50px; + left: 30px; + } + </style> + <body> + <div id="s1" class="square"></div> + <div id="s2" class="square"></div> + <div id="s3" class="square"></div> + </body> +</html> diff --git a/testing/web-platform/tests/pointerevents/resources/pointerevent_mouse_pointercapture_inactivate_pointer-iframe.html b/testing/web-platform/tests/pointerevents/resources/pointerevent_mouse_pointercapture_inactivate_pointer-iframe.html new file mode 100644 index 0000000000..3c88328b00 --- /dev/null +++ b/testing/web-platform/tests/pointerevents/resources/pointerevent_mouse_pointercapture_inactivate_pointer-iframe.html @@ -0,0 +1,3 @@ +<body id='innerFrame' style='height:500px; width: 500px; padding: 0; margin: 0;'> + <div id = 'target'></div> +</body> diff --git a/testing/web-platform/tests/pointerevents/resources/pointerevent_pointerId_scope-iframe.html b/testing/web-platform/tests/pointerevents/resources/pointerevent_pointerId_scope-iframe.html new file mode 100644 index 0000000000..c1fa22aa4c --- /dev/null +++ b/testing/web-platform/tests/pointerevents/resources/pointerevent_pointerId_scope-iframe.html @@ -0,0 +1,35 @@ +<!doctype html> +<html> + <!-- +Test cases for Pointer Events v1 spec +This document references Test Assertions (abbrev TA below) written by Cathy Chan +http://www.w3.org/wiki/PointerEvents/TestAssertions +--> + <head> + <title>Pointer Events pointerdown tests</title> + <meta name="viewport" content="width=device-width"> + <link rel="stylesheet" type="text/css" href="../pointerevent_styles.css"> + <script> + function run() { + var target1 = document.getElementById("target1"); + + var eventList = ['pointerenter', 'pointerover', 'pointermove', 'pointerout', 'pointerleave']; + + eventList.forEach(function(eventName) { + target1.addEventListener(eventName, function (event) { + var pass_data = { + 'pointerId' : event.pointerId, + 'type' : event.type, + 'pointerType' : event.pointerType + }; + top.postMessage(pass_data, "*"); + }); + }); + } + </script> + </head> + <body onload="run()"> + <div id="target1" class="touchActionNone"> + </div> + </body> +</html> diff --git a/testing/web-platform/tests/pointerevents/resources/pointerevent_pointercapture-iframe.html b/testing/web-platform/tests/pointerevents/resources/pointerevent_pointercapture-iframe.html new file mode 100644 index 0000000000..1007566269 --- /dev/null +++ b/testing/web-platform/tests/pointerevents/resources/pointerevent_pointercapture-iframe.html @@ -0,0 +1,14 @@ +<html id='innerFrameDocument'> +<style> +body { + touch-action:none; +} +</style> + <body id='innerFrame' style='height:500px; width: 500px; padding: 0; margin: 0;'> + <script> + top.document.testEventList.forEach(function(eventName) { + document.addEventListener(eventName, top.handleEvent); + }); + </script> + </body> +</html> diff --git a/testing/web-platform/tests/pointerevents/resources/pointerevent_pointerrawupdate_in_pointerlock-iframe.html b/testing/web-platform/tests/pointerevents/resources/pointerevent_pointerrawupdate_in_pointerlock-iframe.html new file mode 100644 index 0000000000..505fc2cae4 --- /dev/null +++ b/testing/web-platform/tests/pointerevents/resources/pointerevent_pointerrawupdate_in_pointerlock-iframe.html @@ -0,0 +1,10 @@ +<!doctype html> +<html> + <head> + <meta name="viewport" content="width=device-width"> + <link rel="stylesheet" type="text/css" href="../pointerevent_styles.css"> + </head> + <body> + <div id="target1"></div> + </body> +</html> |