summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/empty-get.html
blob: b588b5193e1185e7ce224bffea1949847ce6766b (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
35
36
<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>