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> |