<html> | |
<head> | |
<title>Submitting forms with empty data</title> | |
</head> | |
<body> | |
<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=8051">bug 8051</a>: | |
Empty forms are submitted incorrectly.</p> | |
<form name="f" method="get" action=""> | |
<input type="submit" value="Continue"/> | |
</form> | |
<script> | |
if (window.testRunner) { | |
testRunner.dumpAsText(); | |
testRunner.waitUntilDone(); | |
} | |
if (document.URL.indexOf('?') == -1) { | |
document.f.submit(); | |
} else { | |
if (unescape(document.URL.substring(document.URL.indexOf('?')+1, document.URL.length)) == "") | |
document.write("<p>Success</p>"); | |
else | |
document.write("<p>Failure</p>"); | |
if (window.testRunner) | |
testRunner.notifyDone(); | |
} | |
</script> | |
</body> | |
</html> |