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

Unified Diff: LayoutTests/http/tests/xmlhttprequest/send-document-content-type-charset.html

Issue 791783002: Make XMLHttpRequest::send(document) include charset=UTF-8 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: test Created 6 years 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
« no previous file with comments | « no previous file | Source/core/xmlhttprequest/XMLHttpRequest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/xmlhttprequest/send-document-content-type-charset.html
diff --git a/LayoutTests/http/tests/xmlhttprequest/send-document-content-type-charset.html b/LayoutTests/http/tests/xmlhttprequest/send-document-content-type-charset.html
new file mode 100644
index 0000000000000000000000000000000000000000..e822732a6ae6c672f360ab18080b52a1e9ed216f
--- /dev/null
+++ b/LayoutTests/http/tests/xmlhttprequest/send-document-content-type-charset.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="GBK">
+<title>XMLHttpRequest.send(document) Content-Type header</title>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+</head>
+<body>
+<script>
+async_test(function(t) {
+ assert_equals(document.charset, "GBK");
+ xhr = new XMLHttpRequest;
+ xhr.open("POST", "print-content-type.cgi");
+ xhr.send(document);
+ xhr.onloadend = t.step_func_done(function() {
+ assert_equals(xhr.responseText, "application/xml;charset=UTF-8\n");
+ });
+});
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | Source/core/xmlhttprequest/XMLHttpRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698