4 <script src=
"../../resources/js-test.js"></script>
7 <p id=
"description"></p>
8 <div id=
"console"></div>
9 <form id=f
action=
"interactive-validation-required-checkbox.html">
10 <input type=hidden name=submitted
value=
"true">
11 <input type=checkbox required name=terms id=i0
>
12 <input type=submit
id=
"s">
15 description('There was a bug of validation of a required checkbox. This test confirms the bug has been fixed.');
17 function startOrVerify() {
18 var query
= window
.location
.search
;
19 if (query
.indexOf('submitted=true') != -1) {
20 testPassed('The form should be submitted.');
21 shouldBeTrue('location.search.indexOf("terms=on") != -1');
22 debug('TEST COMPLETE');
23 if (window
.testRunner
)
24 testRunner
.notifyDone();
26 document
.getElementById('i0').checked
= true;
27 // HTMLFormElement::submit() skips validation. Use the submit button.
28 document
.getElementById('s').click();
29 testFailed('The form was not submitted.');
33 if (window
.testRunner
)
34 testRunner
.waitUntilDone();
35 window
.onload
= startOrVerify
;