Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Unified Diff: LayoutTests/http/tests/xmlhttprequest/request-encoding4.html

Issue 22875053: Do not normalize into NFC the data sent by XMLHttpRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/xmlhttprequest/request-encoding4.html
diff --git a/LayoutTests/http/tests/xmlhttprequest/request-encoding4.html b/LayoutTests/http/tests/xmlhttprequest/request-encoding4.html
new file mode 100644
index 0000000000000000000000000000000000000000..d2c139c44ed4c7d406f131ab840388b35928c773
--- /dev/null
+++ b/LayoutTests/http/tests/xmlhttprequest/request-encoding4.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+</head>
+<body>
+<p>Test for <a href="http://crbug.com/277526">http://crbug.com/277526</a>:
+XMLHttpRequest normalizes the data sent to the server into Unicode NFC.</p>
+<iframe id="frame" src="resources/request-encoding4-doc.html" onload="onFrameLoaded()"></iframe>
+<div id="result">FAIL: script didn't run to completion.</div>
+<script>
+
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ }
+
+ function onFrameLoaded() {
+ var xhr = new XMLHttpRequest;
+ xhr.open("POST", "resources/post-echo-as-utf-8.cgi", false);
+ xhr.setRequestHeader("content-type", "text/html; charset=UTF-8");
+ xhr.send(document.getElementById("frame").contentDocument);
+ if (xhr.responseText == "<html><head><meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\"></head><body>n\u0303</body></html>")
+ document.getElementById("result").firstChild.data = "SUCCESS";
+ else
+ document.getElementById("result").firstChild.data = "FAILURE: '" + xhr.responseText + "'";
+
+ document.body.removeChild(document.getElementById("frame"));
+
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }
+
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698