summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/inert
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/inert')
-rw-r--r--testing/web-platform/tests/inert/WEB_FEATURES.yml3
-rw-r--r--testing/web-platform/tests/inert/inert-and-find-flat-tree.html28
2 files changed, 31 insertions, 0 deletions
diff --git a/testing/web-platform/tests/inert/WEB_FEATURES.yml b/testing/web-platform/tests/inert/WEB_FEATURES.yml
new file mode 100644
index 0000000000..074e33726c
--- /dev/null
+++ b/testing/web-platform/tests/inert/WEB_FEATURES.yml
@@ -0,0 +1,3 @@
+features:
+- name: inert
+ files: "**"
diff --git a/testing/web-platform/tests/inert/inert-and-find-flat-tree.html b/testing/web-platform/tests/inert/inert-and-find-flat-tree.html
new file mode 100644
index 0000000000..951497e2c0
--- /dev/null
+++ b/testing/web-platform/tests/inert/inert-and-find-flat-tree.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<link rel=author href="mailto:jarhar@chromium.org">
+<link rel=help href="https://html.spec.whatwg.org/#inert-subtrees">
+<link rel=help href="https://issues.chromium.org/issues/336832613">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<div id=host>
+ <template shadowrootmode=open>
+ <dialog>
+ <div>inside shadowroot</div>
+ <slot></slot>
+ </dialog>
+ </template>
+ <div>slotted</div>
+</div>
+
+<script>
+document.getElementById('host').shadowRoot.querySelector('dialog').showModal();
+
+test(() => {
+ assert_true(window.find('inside shadowroot'));
+}, 'Text inside a dialog inside a shadowroot should be findable.');
+
+test(() => {
+ assert_true(window.find('slotted'));
+}, 'Text slotted into a dialog which is inside a shadowroot should be findable.');
+</script>