OLD | NEW |
1 <p>Tests that redirects between origins are never allowed, even when access cont
rol is involved.</p> | 1 <p>Tests that redirects between origins are never allowed, even when access cont
rol is involved.</p> |
2 <p>Per the spec, these test cases should be allowed, but cross-origin redirects
are currently unsupported in WebCore.</p> | 2 <p>Per the spec, these test cases should be allowed, but cross-origin redirects
are currently unsupported in WebCore.</p> |
3 | 3 |
4 <pre id="console"></pre> | 4 <pre id="console"></pre> |
5 <script> | 5 <script> |
6 if (window.testRunner) { | 6 if (window.testRunner) { |
7 testRunner.dumpAsText(); | 7 testRunner.dumpAsText(); |
8 testRunner.waitUntilDone(); | 8 testRunner.waitUntilDone(); |
9 } | 9 } |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 nextTest(); | 38 nextTest(); |
39 } | 39 } |
40 req.onerror = function() { | 40 req.onerror = function() { |
41 log((expectAsyncSuccess ? "FAIL" : "PASS") + ": " + req.status); | 41 log((expectAsyncSuccess ? "FAIL" : "PASS") + ": " + req.status); |
42 nextTest(); | 42 nextTest(); |
43 } | 43 } |
44 req.send(null); | 44 req.send(null); |
45 } | 45 } |
46 | 46 |
47 var tests = [ | 47 var tests = [ |
48 ["/resources/redirect.php?url=http://localhost:8000/xmlhttprequest/resources
/access-control-basic-allow.cgi", false, false], | 48 ["/resources/redirect.php?url=http://localhost:8000/xmlhttprequest/resources
/access-control-basic-allow.cgi", false, true], |
49 ["http://localhost:8000/resources/redirect.php?url=http://127.0.0.1:8000/xml
httprequest/resources/access-control-basic-allow.cgi", false, false], | 49 ["http://localhost:8000/resources/redirect.php?url=http://127.0.0.1:8000/xml
httprequest/resources/access-control-basic-allow.cgi", false, false], |
50 ["http://localhost:8000/resources/redirect.php?url=http://localhost:8000/xml
httprequest/resources/access-control-basic-allow.cgi", false, false] | 50 ["http://localhost:8000/resources/redirect.php?url=http://localhost:8000/xml
httprequest/resources/access-control-basic-allow.cgi", false, false] |
51 ] | 51 ] |
52 | 52 |
53 var currentTest = 0; | 53 var currentTest = 0; |
54 | 54 |
55 function nextTest() { | 55 function nextTest() { |
56 if (currentTest < tests.length) | 56 if (currentTest < tests.length) |
57 runTest.apply(null, tests[currentTest++]); | 57 runTest.apply(null, tests[currentTest++]); |
58 else if (window.testRunner) | 58 else if (window.testRunner) |
59 testRunner.notifyDone(); | 59 testRunner.notifyDone(); |
60 } | 60 } |
61 | 61 |
62 nextTest(); | 62 nextTest(); |
63 </script> | 63 </script> |
OLD | NEW |