blob: 34b4e5eea576703d78707340b09a575c1e5bcc78 (
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
27
28
29
30
31
32
33
34
|
<!DOCTYPE html>
<html>
<body>
<script src="../../resources/js-test.js"></script>
<script src="resources/common.js"></script>
<form id="f" action="interactive-validation-formnovalidate-2.html">
<input type="hidden" name="submitted" value="true">
<input name="i0" required id="i0">
<input type="submit" id="s" formnovalidate>
</form>
<script>
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');
debug('TEST COMPLETE');
if (window.testRunner)
testRunner.notifyDone();
} else {
// HTMLFormElement::submit() skips validation. Use the submit button.
clickElement(document.getElementById('s'));
testFailed('The form was not submitted.');
}
}
if (window.testRunner)
testRunner.waitUntilDone();
window.onload = startOrVerify;
</script>
</body>
</html>
|