<html>
<head>
<title>Submitting forms with empty data</title>
</head>
<body>
<p>Test for <a href="http://bugzilla.opendarwin.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.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>