summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/ValidityState-valueMissing-006.html
blob: 0df4473d73772180d6a01f17c8fa1899ea609d90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<html>
<head>
<title>required and valueMissing on checkboxes</title>
<script language="JavaScript" type="text/javascript">
    function log(message) {
        document.getElementById("console").innerHTML += "<li>"+message+"</li>";
    }

    function test() {
        if (window.testRunner)
            testRunner.dumpAsText();

        v = document.getElementsByName("victim");

        log(!v[0].validity.valueMissing && v[1].validity.valueMissing ? "SUCCESS" : "FAILURE");
    }
</script>
</head>
<body onload="test()">
<p>There are two checkboxes below, both are required, only one is checked.</p>
<input name="victim" type="checkbox" required checked/>
<input name="victim" type="checkbox" required />
<hr>
<ol id="console"></ol>
</body>
</html>