2010-12-08 Alejandro G. Castro <alex@igalia.com>
[WebKit-https.git] / LayoutTests / fast / forms / ValidityState-valueMissing-003.html
1 <html>
2 <head>
3 <title>required and valueMissing on disabled elements</title>
4 <script language="JavaScript" type="text/javascript">
5     function log(message) {
6         document.getElementById("console").innerHTML += "<li>"+message+"</li>";
7     }
8
9     function test() {
10         if (window.layoutTestController)
11             layoutTestController.dumpAsText();
12
13         v = document.getElementsByName("victim");
14
15         log((!v[0].validity.valueMissing && !v[1].validity.valueMissing) ? "SUCCESS" : "FAILURE");
16     }
17 </script>
18 </head>
19 <body onload="test()">
20 <p>There are two disabled form control elements below, both required and with some value:
21 validity.valueMissing should be false in both cases.</p>
22 <input name="victim" disabled required />
23 <textarea name="victim" disabled required></textarea>
24 <hr>
25 <ol id="console"></ol>
26 </body>
27 </html>