Skip to content

Commit

Permalink
Add a test for :autofill / :-webkit-autofill.
Browse files Browse the repository at this point in the history
There's no way to trigger autofilling from WPT so this is as much as we
can test.
  • Loading branch information
emilio committed Jan 8, 2021
1 parent 289878d commit 7e9eadf
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions html/semantics/selectors/pseudo-classes/autofill.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!doctype html>
<meta charset=utf-8>
<title>Selector: pseudo-classes (:autofill)</title>
<link rel=help href="https://html.spec.whatwg.org/multipage/#pseudo-classes">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(function() {
document.querySelector(":autofill"); // Shouldn't throw.
}, "Unprefixed autofill pseudo-class is supported");
test(function() {
document.querySelector(":-webkit-autofill"); // Shouldn't throw.
}, "-webkit-prefixed autofill pseudo-class is supported");
</script>

0 comments on commit 7e9eadf

Please sign in to comment.