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

Side by Side Diff: LayoutTests/http/tests/xmlhttprequest/redirect-cors-origin-null.html

Issue 20735002: CORS: Fix the handling of redirected request containing Origin null. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 <html>
2 <body>
3 <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>
4 Request URL origin is not same origin with the original URL origin. Final respon se contains "Access-Control-Allow-Origin: null". Should print PASS.</p>
5 <div id="log"></div>
6 <script>
7 function log(message) {
8 document.getElementById("log").innerHTML += message + "<br>";
9 }
10
11 if (window.layoutTestController) {
12 layoutTestController.dumpAsText();
13 layoutTestController.waitUntilDone();
14 }
15
16 var xhr = new XMLHttpRequest();
17 xhr.open("GET", "http://localhost:8080/xmlhttprequest/resources/redirect-cors-or igin-null.php");
18 xhr.onerror = function () {
19 log("FAIL");
20 if (window.layoutTestController)
21 layoutTestController.notifyDone();
22 };
23 xhr.onreadystatechange = function () {
24 if (xhr.readyState == 4) {
25 log(xhr.responseText);
26 if (window.layoutTestController)
27 layoutTestController.notifyDone();
28 }
29 };
30 xhr.send();
31
32 </script>
33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698