| OLD | NEW |
| (Empty) | |
| 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 <iframe id="frame" src="resources/request-encoding4-doc.html" onload="onFrameLoa
ded()"></iframe> |
| 10 <div id="result">FAIL: script didn't run to completion.</div> |
| 11 <script> |
| 12 |
| 13 if (window.testRunner) { |
| 14 testRunner.dumpAsText(); |
| 15 testRunner.waitUntilDone(); |
| 16 } |
| 17 |
| 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\" c
ontent=\"text/html; charset=UTF-8\"></head><body>n\u0303</body></html>") |
| 24 document.getElementById("result").firstChild.data = "SUCCESS"; |
| 25 else |
| 26 document.getElementById("result").firstChild.data = "FAILURE: '" + x
hr.responseText + "'"; |
| 27 |
| 28 document.body.removeChild(document.getElementById("frame")); |
| 29 |
| 30 if (window.testRunner) |
| 31 testRunner.notifyDone(); |
| 32 } |
| 33 |
| 34 </script> |
| 35 </body> |
| 36 </html> |
| OLD | NEW |