blob: 6ef113158c8fae8270580253b948ebccc50af929 [file] [log] [blame]
<html>
<base href="http://www.example.com/failure/">
<head>
<title>Submitting forms with no action attribute</title>
</head>
<body>
<p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=17042">bug 17042</a>: Forms without actions and a base tag submit incorrectly.</p>
<form name="f" method="get">
<input type="submit" value="Test"/>
</form>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.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.layoutTestController)
layoutTestController.notifyDone();
}
</script>
</body>
</html>