Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / xmlhttprequest / request-encoding.html
blob78f90ec4b382e1eb589678f7e287917ac48dc6b9
1 <html>
2 <head>
3 <meta http-equiv="content-type" content="text/html;charset=koi8-r">
4 <body>
5 <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=12099">bug 12099</a>:
6 XMLHttpRequest shouldn't honor a charset specified via setRequestHeader.</p>
7 <div id=result>FAIL: script didn't run to completion.</div>
8 <script>
10 if (window.testRunner)
11 testRunner.dumpAsText();
13 req = new XMLHttpRequest;
14 req.open("POST", "resources/post-echo-as-utf-8.cgi", false);
15 req.setRequestHeader("Content-Type", "text/plain; charset='windows-1251'");
16 req.send("ðÒÏ×ÅÒËÁ");
17 if (req.responseText == "ðÒÏ×ÅÒËÁ")
18 document.getElementById("result").firstChild.data = "SUCCESS";
19 else
20 document.getElementById("result").firstChild.data = "FAILURE: '" + req.responseText + "'";
22 </script>
23 </body>
24 </html>