diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/forms/the-output-element/output-setcustomvalidity.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/forms/the-output-element/output-setcustomvalidity.html | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/forms/the-output-element/output-setcustomvalidity.html b/testing/web-platform/tests/html/semantics/forms/the-output-element/output-setcustomvalidity.html new file mode 100644 index 0000000000..1166eeb610 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/forms/the-output-element/output-setcustomvalidity.html @@ -0,0 +1,17 @@ +<!DOCTYPE HTML> +<title>output setCustomValidity</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<output id='output_test'></output> + +<script> + +test(() => { + let elem = document.getElementById("output_test"); + assert_false(elem.validity.customError); + elem.setCustomValidity("custom error"); + assert_true(elem.validity.customError); +}, "output setCustomValidity is correct") + +</script> |