summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/is-input-pending/security
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/is-input-pending/security')
-rw-r--r--testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-complex-clip.sub.html27
-rw-r--r--testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-masked-complex-clip.sub.html34
-rw-r--r--testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-masked-pointer-events-mixed-2.sub.html45
-rw-r--r--testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-masked-pointer-events-mixed.sub.html43
-rw-r--r--testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-masked-pointer-events-none.sub.html33
-rw-r--r--testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-overlap.sub.html28
-rw-r--r--testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-pointer-events-none.sub.html26
-rw-r--r--testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-transformed.sub.html27
-rw-r--r--testing/web-platform/tests/is-input-pending/security/cross-origin-subframe.sub.html21
9 files changed, 284 insertions, 0 deletions
diff --git a/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-complex-clip.sub.html b/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-complex-clip.sub.html
new file mode 100644
index 0000000000..0bbe9c0782
--- /dev/null
+++ b/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-complex-clip.sub.html
@@ -0,0 +1,27 @@
+<!doctype html>
+<html>
+<head>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../resources/input-onmessage.js"></script>
+<script src="../resources/pending-input-utils.js"></script>
+<style>
+iframe {
+ clip-path: ellipse(160px 90px);
+}
+</style>
+</head>
+<body>
+ <div class="obscurer"></div>
+ <iframe src="http://{{hosts[][www1]}}:{{ports[http][0]}}/is-input-pending/resources/blank.html"></iframe>
+ <p>Ensure that a parent frame cannot detect events on a cross-origin subframe with a complex clip.</p>
+ <script>
+ window.addEventListener('load', () => {
+ PendingInputUtils.testCannotAccessPendingInputAt(window, 160, 90, 'parent cannot detect cross-origin events');
+ });
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-masked-complex-clip.sub.html b/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-masked-complex-clip.sub.html
new file mode 100644
index 0000000000..e5a3d310a9
--- /dev/null
+++ b/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-masked-complex-clip.sub.html
@@ -0,0 +1,34 @@
+<!doctype html>
+<html>
+<head>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../resources/input-onmessage.js"></script>
+<script src="../resources/pending-input-utils.js"></script>
+<style>
+.obscurer {
+ position: fixed;
+ top: 0px;
+ left: 0px;
+ width: 320px;
+ height: 180px;
+ background-color: rgba(0, 0, 255, 0.25);
+ clip-path: ellipse(160px 90px);
+}
+</style>
+</head>
+<body>
+ <iframe src="http://{{hosts[][www1]}}:{{ports[http][0]}}/is-input-pending/resources/blank.html"></iframe>
+ <div class="obscurer"></div>
+ <p>Ensure that a parent frame cannot detect events on a cross-origin subframe masked by a div with a complex clip.</p>
+ <script>
+ window.addEventListener('load', () => {
+ PendingInputUtils.testCannotAccessPendingInputAt(window, 10, 10, 'parent cannot detect cross-origin events outside of clip');
+ PendingInputUtils.testCannotAccessPendingInputAt(frames[0], 50, 50, 'subframe cannot detect events inside of clip');
+ });
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-masked-pointer-events-mixed-2.sub.html b/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-masked-pointer-events-mixed-2.sub.html
new file mode 100644
index 0000000000..55cbc48b7d
--- /dev/null
+++ b/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-masked-pointer-events-mixed-2.sub.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<html>
+<head>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../resources/input-onmessage.js"></script>
+<script src="../resources/pending-input-utils.js"></script>
+<style>
+.obscurer {
+ position: fixed;
+ top: 0px;
+ left: 0px;
+ width: 160px;
+ height: 180px;
+ background-color: rgba(0, 0, 255, 0.25);
+}
+
+.obscurer > * {
+ position: absolute;
+ left: 160px;
+ width: 160px;
+ height: 90px;
+ pointer-events: none;
+ background-color: rgba(255, 0, 0, 0.25);
+}
+
+</style>
+</head>
+<body>
+ <iframe src="http://{{hosts[][www1]}}:{{ports[http][0]}}/is-input-pending/resources/blank.html"></iframe>
+ <div class="obscurer">
+ <div></div>
+ </div>
+ <p>Ensure that a parent frame cannot detect events on top of a cross-origin subframe masked by a div with a `pointer-events: none` child.</p>
+ <script>
+ window.addEventListener('load', () => {
+ PendingInputUtils.testCannotAccessPendingInputAt(window, 180, 120, 'parent cannot detect cross-origin events in `pointer-events: none` region');
+ PendingInputUtils.testCannotAccessPendingInputAt(frames[0], 10, 10, 'subframe cannot detect events in `pointer-events: initial` region');
+ });
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-masked-pointer-events-mixed.sub.html b/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-masked-pointer-events-mixed.sub.html
new file mode 100644
index 0000000000..b0363682ef
--- /dev/null
+++ b/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-masked-pointer-events-mixed.sub.html
@@ -0,0 +1,43 @@
+<!doctype html>
+<html>
+<head>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../resources/input-onmessage.js"></script>
+<script src="../resources/pending-input-utils.js"></script>
+<style>
+.obscurer {
+ position: fixed;
+ top: 0px;
+ left: 0px;
+ width: 320px;
+ height: 180px;
+ pointer-events: none;
+ background-color: rgba(0, 0, 255, 0.25);
+}
+
+.obscurer > * {
+ width: 160px;
+ height: 180px;
+ pointer-events: initial;
+ background-color: rgba(255, 0, 0, 0.25);
+}
+
+</style>
+</head>
+<body>
+ <div class="obscurer">
+ <div></div>
+ </div>
+ <iframe src="http://{{hosts[][www1]}}:{{ports[http][0]}}/is-input-pending/resources/blank.html"></iframe>
+ <p>Ensure that a parent frame cannot can events on top of a cross-origin subframe masked by a div with `pointer-events: none` and a `pointer-events: initial` child.</p>
+ <script>
+ window.addEventListener('load', () => {
+ PendingInputUtils.testCannotAccessPendingInputAt(window, 180, 10, 'cannot detect cross-origin events in `pointer-events: none` region');
+ });
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-masked-pointer-events-none.sub.html b/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-masked-pointer-events-none.sub.html
new file mode 100644
index 0000000000..a3f971cdfd
--- /dev/null
+++ b/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-masked-pointer-events-none.sub.html
@@ -0,0 +1,33 @@
+<!doctype html>
+<html>
+<head>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../resources/input-onmessage.js"></script>
+<script src="../resources/pending-input-utils.js"></script>
+<style>
+.obscurer {
+ position: fixed;
+ top: 0px;
+ left: 0px;
+ width: 320px;
+ height: 180px;
+ pointer-events: none;
+ background-color: rgba(0, 0, 255, 0.25);
+}
+</style>
+</head>
+<body>
+ <div class="obscurer"></div>
+ <iframe src="http://{{hosts[][www1]}}:{{ports[http][0]}}/is-input-pending/resources/blank.html"></iframe>
+ <p>Ensure that a parent frame cannot detect events on a cross-origin subframe masked by a div with `pointer-events: none`.</p>
+ <script>
+ window.addEventListener('load', () => {
+ PendingInputUtils.testCannotAccessPendingInputAt(window, 10, 10, 'parent cannot detect events');
+ });
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-overlap.sub.html b/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-overlap.sub.html
new file mode 100644
index 0000000000..377eedbf35
--- /dev/null
+++ b/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-overlap.sub.html
@@ -0,0 +1,28 @@
+<!doctype html>
+<html>
+<head>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../resources/input-onmessage.js"></script>
+<script src="../resources/pending-input-utils.js"></script>
+<style>
+.occluding {
+ margin-left: -100px;
+}
+</style>
+</head>
+<body>
+ <iframe src="http://{{hosts[][www1]}}:{{ports[http][0]}}/is-input-pending/resources/blank.html"></iframe>
+ <iframe class="occluding" src="http://{{hosts[][www2]}}:{{ports[http][0]}}/is-input-pending/resources/blank.html"></iframe>
+ <p>Ensure that two overlapping subframes cannot detect events from each other.</p>
+ <script>
+ window.addEventListener('load', () => {
+ PendingInputUtils.testCannotAccessPendingInputAt(window, 280, 10, 'parent cannot detect input on occluding iframe');
+ PendingInputUtils.testCannotAccessPendingInputAt(frames[0], 280, 10, 'occluded iframe cannot detect input on occluding iframe');
+ });
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-pointer-events-none.sub.html b/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-pointer-events-none.sub.html
new file mode 100644
index 0000000000..371a92866a
--- /dev/null
+++ b/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-pointer-events-none.sub.html
@@ -0,0 +1,26 @@
+<!doctype html>
+<html>
+<head>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../resources/input-onmessage.js"></script>
+<script src="../resources/pending-input-utils.js"></script>
+<style>
+iframe {
+ pointer-events: none;
+}
+</style>
+</head>
+<body>
+ <iframe src="http://{{hosts[][www1]}}:{{ports[http][0]}}/is-input-pending/resources/blank.html"></iframe>
+ <p>Ensure that a subframe cannot detect events if it has `pointer-events: none`.</p>
+ <script>
+ window.addEventListener('load', () => {
+ PendingInputUtils.testCannotAccessPendingInputAt(frames[0], 10, 10, 'iframe cannot detect events with pointer-events: none');
+ });
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-transformed.sub.html b/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-transformed.sub.html
new file mode 100644
index 0000000000..5dac5aa36b
--- /dev/null
+++ b/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe-transformed.sub.html
@@ -0,0 +1,27 @@
+<!doctype html>
+<html>
+<head>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../resources/input-onmessage.js"></script>
+<script src="../resources/pending-input-utils.js"></script>
+<style>
+iframe {
+ transform: rotateZ(-45deg);
+}
+</style>
+</head>
+<body>
+ <iframe src="http://{{hosts[][www1]}}:{{ports[http][0]}}/is-input-pending/resources/blank.html"></iframe>
+ <p>Ensure that a parent frame cannot detect events on a cross-origin subframe when the subframe does not intersect and is not an axis-aligned rect.</p>
+ <script>
+ window.addEventListener('load', () => {
+ PendingInputUtils.testCannotAccessPendingInputAt(window, 100, 50, 'parent cannot detect input inside of iframe bounds');
+ PendingInputUtils.testCannotAccessPendingInputAt(frames[0], 10, 10, 'subframe cannot detect input outside of iframe bounds');
+ });
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe.sub.html b/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe.sub.html
new file mode 100644
index 0000000000..d513fa94fc
--- /dev/null
+++ b/testing/web-platform/tests/is-input-pending/security/cross-origin-subframe.sub.html
@@ -0,0 +1,21 @@
+<!doctype html>
+<html>
+<head>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../resources/input-onmessage.js"></script>
+<script src="../resources/pending-input-utils.js"></script>
+</head>
+<body>
+ <iframe src="http://{{hosts[][www1]}}:{{ports[http][0]}}/is-input-pending/resources/blank.html"></iframe>
+ <p>Ensure that a parent frame cannot detect events on a cross-origin subframe.</p>
+ <script>
+ window.addEventListener('load', () => {
+ PendingInputUtils.testCannotAccessPendingInputAt(window, 10, 10, 'cannot detect cross-origin events on subframe');
+ });
+ </script>
+</body>
+</html>