4 <meta http-equiv=
"content-type" content=
"text/html; charset=UTF-8">
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 <iframe id=
"frame" src=
"resources/request-encoding4-doc.html" onload=
"onFrameLoaded()"></iframe>
10 <div id=
"result">FAIL: script didn't run to completion.
</div>
13 if (window
.testRunner
) {
14 testRunner
.dumpAsText();
15 testRunner
.waitUntilDone();
18 function onFrameLoaded() {
19 var xhr
= new XMLHttpRequest
;
20 xhr
.open("POST", "resources/post-echo-as-utf-8.cgi", false);
21 xhr
.setRequestHeader("content-type", "text/html; charset=UTF-8");
22 xhr
.send(document
.getElementById("frame").contentDocument
);
23 if (xhr
.responseText
== "<html><head><meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\"></head><body>n\u0303</body></html>")
24 document
.getElementById("result").firstChild
.data
= "SUCCESS";
26 document
.getElementById("result").firstChild
.data
= "FAILURE: '" + xhr
.responseText
+ "'";
28 document
.body
.removeChild(document
.getElementById("frame"));
30 if (window
.testRunner
)
31 testRunner
.notifyDone();