summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/form-get-multipart2.html
blob: 8758392ef879b2217ed3fc6ee651c7cd79346e37 (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
37
38
39
40
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>Regression test for bug 5291</title>
</head>
<body>
                <form method="get" enctype="multipart/form-data" action="?" name=f>
                        <input type="hidden" name="hidden" value="I am hidden">
                        <input type="submit" value="press me">
                </form>
<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}

if (document.URL.substring(0, 4) == "file") {

    if (document.URL.indexOf('?') == -1) {

        document.f.submit();

    } else {

        if (document.URL.substring(document.URL.indexOf('?')+1, document.URL.length) == "hidden=I+am+hidden")
            document.write("<p>Success</p>");
        else
            document.write("<p>Failure</p>");

        if (window.testRunner)
            testRunner.notifyDone();
    }

} else {

    document.write("<p>This test doesn't work directly from bugzilla, please save it to a local file first.</p>");
}
</script>
</body>
</html>