summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/selectors/user-valid.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/css/selectors/user-valid.html')
-rw-r--r--testing/web-platform/tests/css/selectors/user-valid.html14
1 files changed, 14 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/selectors/user-valid.html b/testing/web-platform/tests/css/selectors/user-valid.html
new file mode 100644
index 0000000000..36ca7afe14
--- /dev/null
+++ b/testing/web-platform/tests/css/selectors/user-valid.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<title>Support for the :user-valid pseudo-class</title>
+<link rel="help" href="https://drafts.csswg.org/selectors/#user-pseudos">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<input>
+<script>
+test(() => {
+ const input = document.querySelector('input');
+ assert_true(input.validity.valid);
+ // The selector can't match because no interaction has happened.
+ assert_false(input.matches(':user-valid'));
+}, ':user-valid selector should be supported');
+</script>