Rubber-stamped by Brady Eidson.
[webbrowser.git] / LayoutTests / fast / forms / ValidityState-customError-002.html
blob07d26240c2aa0802da334204ccc6fc09e42ee030
1 <html>
2 <head>
3 <title>setCustomValidity and customError 2</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");
17 for (i = 0; i < v.length; i++) {
18 v[i].setCustomValidity("");
19 log(!v[i].validity.customError ? "SUCCESS" : "FAILURE");
22 </script>
23 </head>
24 <body onload="test()">
25 <fieldset name="victim"></fieldset>
26 <button name="victim"></button>
27 <select name="victim"></select>
28 <textarea name="victim"></textarea>
29 <input name="victim" />
30 <hr>
31 <ol id="console"></ol>
32 </body>
33 </html>