Index: LayoutTests/http/tests/xmlhttprequest/redirect-cors-origin-null.html |
diff --git a/LayoutTests/http/tests/xmlhttprequest/redirect-cors-origin-null.html b/LayoutTests/http/tests/xmlhttprequest/redirect-cors-origin-null.html |
new file mode 100755 |
index 0000000000000000000000000000000000000000..d2653a592949c4a7c948b990e3b2242b73806521 |
--- /dev/null |
+++ b/LayoutTests/http/tests/xmlhttprequest/redirect-cors-origin-null.html |
@@ -0,0 +1,33 @@ |
+<html> |
+<body> |
+<p>Test opera W3C test suite(http://w3c-test.org/webappsec/tests/cors/submitted/opera/staging/redirect-origin.htm) test case 13 for redirection.<br> |
+Request URL origin is not same origin with the original URL origin. Final response contains "Access-Control-Allow-Origin: null". Should print PASS.</p> |
+<div id="log"></div> |
+<script> |
+function log(message) { |
+ document.getElementById("log").innerHTML += message + "<br>"; |
+} |
+ |
+if (window.layoutTestController) { |
+ layoutTestController.dumpAsText(); |
+ layoutTestController.waitUntilDone(); |
+} |
+ |
+var xhr = new XMLHttpRequest(); |
+xhr.open("GET", "http://localhost:8080/xmlhttprequest/resources/redirect-cors-origin-null.php"); |
+xhr.onerror = function () { |
+ log("FAIL"); |
+ if (window.layoutTestController) |
+ layoutTestController.notifyDone(); |
+}; |
+xhr.onreadystatechange = function () { |
+ if (xhr.readyState == 4) { |
+ log(xhr.responseText); |
+ if (window.layoutTestController) |
+ layoutTestController.notifyDone(); |
+ } |
+}; |
+xhr.send(); |
+ |
+</script> |
+</html> |