1
0
Fork 0
firefox/testing/web-platform/tests/css/css-ui/interactivity-inert-find.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

32 lines
803 B
HTML

<!DOCTYPE html>
<title>CSS Basic User Interface Test: window.find() works with the interactivity property</title>
<link rel="help" href="https://drafts.csswg.org/css-ui-4/#inertness">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
.inert { interactivity: inert; }
.non-inert { interactivity: auto; }
</style>
<div>
MATCH-1
<div class="inert">
MATCH-2
<div class="non-inert">
MATCH-3
</div>
</div>
</div>
<script>
test(() => {
assert_true(window.find("MATCH-1"));
}, "Find non-inert text");
test(() => {
assert_false(window.find("MATCH-2"));
}, "Fail to find inert text");
test(() => {
assert_true(window.find("MATCH-3"));
}, "Find non-inert text inside inert ancestor");
</script>