Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / xmlhttprequest / request-encoding3.html
blob6ff6562689a2b93e78d44138ee8c2076de95a879
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
5 </head>
6 <body>
7 <p>Test for <a href="http://crbug.com/277526">http://crbug.com/277526</a>:
8 XMLHttpRequest normalizes the data sent to the server into Unicode NFC.</p>
9 <div id="result">FAIL: script didn't run to completion.</div>
10 <script>
12 if (window.testRunner)
13 testRunner.dumpAsText();
15 var xhr = new XMLHttpRequest;
16 xhr.open("POST", "resources/post-echo-as-utf-8.cgi", false);
17 xhr.setRequestHeader("content-type", "application/json; charset=UTF-8");
18 xhr.send("{\"key\":\"\\n\u0300\"}");
19 if (xhr.responseText == "{\"key\":\"\\n\u0300\"}")
20 document.getElementById("result").firstChild.data = "SUCCESS";
21 else
22 document.getElementById("result").firstChild.data = "FAILURE: '" + xhr.responseText + "'";
24 </script>
25 </body>
26 </html>