Files
sousa-gecko/testing/web-platform/tests/css/css-ui/interactivity-inert-find.html
T
Rune Lillesveen 9c677f418c Bug 1944250 [wpt PR 50332] - Skip interactivity:inert for window.find(), a=testonly
Automatic update from web-platform-tests
Skip interactivity:inert for window.find()

Inert elements may have non-inert descendants when made inert by the
interactivity property. Stop trying doing anything smart for modal and
fullscreen elements.

TEST=external/wpt/inert/inert-with-fullscreen-element.html
TEST=external/wpt/inert/inert-with-modal-dialog-003.html

Bug: 370065759
Change-Id: I48396644a9cf58ca6fc949ee66f9c1e7d34131fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6198191
Auto-Submit: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Steinar H Gunderson <sesse@chromium.org>
Reviewed-by: Steinar H Gunderson <sesse@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1412177}

--

wpt-commits: 9dcde0b30df2bd8fa0ab82be80d5710aa22d9e58
wpt-pr: 50332
2025-01-29 08:54:09 +00:00

33 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>