Index: LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-no-content-type-with-text.html |
diff --git a/LayoutTests/http/tests/xmlhttprequest/access-control-preflight-request-headers-origin.html b/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-no-content-type-with-text.html |
similarity index 63% |
copy from LayoutTests/http/tests/xmlhttprequest/access-control-preflight-request-headers-origin.html |
copy to LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-no-content-type-with-text.html |
index bcf83280d1c9385aa10e3a7cdd5e66228069f86e..271c423b9327c9bc50b15fc751860f49f3d3264d 100644 |
--- a/LayoutTests/http/tests/xmlhttprequest/access-control-preflight-request-headers-origin.html |
+++ b/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-no-content-type-with-text.html |
@@ -1,6 +1,6 @@ |
<html> |
<body> |
-<p>Test that 'Origin' is not included in Access-Control-Request-Headers in a preflight request. Should print PASS.</p> |
+<p>Test that text/plain;charset=UTF-8 is set as default Content-Type for POST requests<br>with text content. Should print PASS.</p> |
<div id="log"></div> |
<script> |
function log(message) { |
@@ -13,21 +13,20 @@ if (window.layoutTestController) { |
} |
var xhr = new XMLHttpRequest(); |
-xhr.open("GET", "http://localhost:8000/xmlhttprequest/resources/access-control-preflight-request-headers-origin.php"); |
-xhr.setRequestHeader("X-Custom-Header", "PASS"); |
+ |
+xhr.open("POST", "resources/xmlhttprequest-no-content-type-with-text.php"); |
xhr.onerror = function () { |
log("FAIL"); |
if (window.layoutTestController) |
layoutTestController.notifyDone(); |
}; |
-xhr.onreadystatechange = function () { |
+xhr.onload = function () { |
if (xhr.readyState == 4) { |
log(xhr.responseText); |
if (window.layoutTestController) |
layoutTestController.notifyDone(); |
} |
}; |
-xhr.send(); |
- |
+xhr.send('Test'); |
</script> |
</html> |