summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/form-data-encoding.html
blob: 68b31f761e46d4855f38860cddc52a925b154228 (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
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>Charsets and submitting forms</title>
</head>
<body>
<form action="?" name=f>
 <input type=hidden name=q value="&#1105;&#66560;&#119083;çc"><br>
</form>
<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}

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

    if (document.URL.indexOf('?') == -1) {
        document.f.q.value += "\u0327"; // cedilla for 'c'
        document.f.submit();

    } else {
        if (unescape(document.URL.substring(document.URL.indexOf('?')+1, document.URL.length)) == unescape("q=%26%231105%3B%26%2366560%3B%26%23119083%3B%E7c%26%23807%3B"))
            document.write("<p>Success</p>");
        else
            document.write("<p>Failure, query is " + document.URL.substring(document.URL.indexOf('?')+1, document.URL.length) + "</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>