| <script src="../../resources/js-test-pre.js"></script> |
| <form id=f action="interactive-validation-formnovalidate.html"> |
| <input type=hidden name=submitted value="true"> |
| <input name=i0 required id="i0"> |
| <input type=submit id="s" formnovalidate> |
| description('Test if the form is submitted with a submit button with formnovalidate.'); |
| function startOrVerify() { |
| var query = window.location.search; |
| if (query.indexOf('submitted=true') != -1) { |
| testPassed('The form should not be submitted.'); |
| shouldBeTrue('location.search.indexOf("i0=") != -1'); |
| // HTMLFormElement::submit() skips validation. Use the submit button. |
| document.getElementById('s').click(); |
| testFailed('The form was not submitted.'); |
| testRunner.waitUntilDone(); |
| window.onload = startOrVerify; |