-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1754476 [wpt PR 32772] - WebKit export of https://bugs.webkit.org…
…/show_bug.cgi?id=236331, a=testonly Automatic update from web-platform-tests WebKit export of https://bugs.webkit.org/show_bug.cgi?id=236331 -- wpt-commits: 5dc2ddb435ccc501a213daa1cec0e9c516fbabcf wpt-pr: 32772
- Loading branch information
1 parent
42e86c9
commit 4439078
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
testing/web-platform/tests/css/selectors/focus-visible-026.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8" /> | ||
<title>CSS Test (Selectors): Checkbox doesn't match :focus-visiblel after click on label</title> | ||
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:[email protected]"> | ||
<link rel="help" href="https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo" /> | ||
<meta name="assert" content="This test checks that :focus-visible does NOT match when a checkbox is focused because an associated label has been clicked."> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/resources/testdriver.js"></script> | ||
<script src="/resources/testdriver-actions.js"></script> | ||
<script src="/resources/testdriver-vendor.js"></script> | ||
<script src="/resources/accesskey.js"></script> | ||
<script src="/css/support/parsing-testcommon.js"></script> | ||
<style> | ||
:focus-visible { | ||
outline: red solid 5px; | ||
} | ||
</style> | ||
<input type="checkbox" id="checkbox"> | ||
<label for="checkbox" id="label">label</label> | ||
<script> | ||
// Check that :focus-visible is supported. | ||
test_valid_selector(':focus-visible'); | ||
|
||
promise_test(async t => { | ||
await test_driver.click(label); | ||
assert_equals(getComputedStyle(checkbox).outlineStyle, "none", `outline-style for ${checkbox.tagName}#${checkbox.id} should be none`); | ||
t.done(); | ||
}, ":focus-visible does NOT match when a checkbox is focused via click on the associated label"); | ||
</script> | ||
|