blob: 53c18117fd0ece0735cd54a392c62bd359478d32 [file] [edit]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<form id=f action="interactive-validation-novalidate.html" novalidate>
<input type=hidden name=submitted value="true">
<input name=i0 required id="i0">
<input type=submit id="s">
</form>
<script>
description('Test if the form with novalidate is submitted.');
window.jsTestIsAsync = true;
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');
debug('TEST COMPLETE');
finishJSTest();
} else {
// HTMLFormElement::submit() skips validation. Use the submit button.
document.getElementById('s').click();
testFailed('The form was not submitted.');
}
}
window.onload = startOrVerify;
</script>
</body>
</html>