summaryrefslogtreecommitdiffstats
path: root/layout/reftests/css-ui-valid/button/button-type-invalid.html
diff options
context:
space:
mode:
Diffstat (limited to 'layout/reftests/css-ui-valid/button/button-type-invalid.html')
-rw-r--r--layout/reftests/css-ui-valid/button/button-type-invalid.html19
1 files changed, 19 insertions, 0 deletions
diff --git a/layout/reftests/css-ui-valid/button/button-type-invalid.html b/layout/reftests/css-ui-valid/button/button-type-invalid.html
new file mode 100644
index 0000000000..637f5aec5f
--- /dev/null
+++ b/layout/reftests/css-ui-valid/button/button-type-invalid.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <!-- Test: if a button has a custom error when barred from constraint
+ validation then move a type candidate for constraint validation,
+ it should not be affected by :valid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function onLoadHandler()
+ {
+ var b = document.getElementById('b');
+ b.setCustomValidity('foo');
+ b.type = 'submit';
+ document.documentElement.className='';
+ }
+ </script>
+ <body onload="onLoadHandler();">
+ <button class='notvalid' type='button' id='b'></button>
+ </body>
+</html>