Rubber-stamped by Brady Eidson.
[webbrowser.git] / LayoutTests / fast / forms / ValidityState-customError-001.html
blob6571008556d0072260bc1829dc70ad9274942f25
1 <html>
2 <head>
3 <title>setCustomValidity and customError</title>
4 <script language="JavaScript" type="text/javascript">
5 function log(message) {
6 document.getElementById("console").innerHTML += "<li>"+message+"</li>";
9 function test() {
10 if (window.layoutTestController)
11 layoutTestController.dumpAsText();
13 v = document.getElementsByName("victim");
14 for (i = 0; i < v.length; i++) {
15 v[i].setCustomValidity("Custom validation message");
16 log(v[i].validity.customError ? "SUCCESS" : "FAILURE");
19 </script>
20 </head>
21 <body onload="test()">
22 <fieldset name="victim"></fieldset>
23 <button name="victim"></button>
24 <select name="victim"></select>
25 <textarea name="victim"></textarea>
26 <input name="victim" />
27 <hr>
28 <ol id="console"></ol>
29 </body>
30 </html>