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

Side by Side Diff: LayoutTests/http/tests/xmlhttprequest/access-control-preflight-request-invalid-status-400.html

Issue 21532002: CORS: Handle error HTTP status code 4XX/5XX in preflight requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/xmlhttprequest/access-control-preflight-request-invalid-status-400-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <body>
3 <p>Test that preflight requests with invalid status code results in error. Shoul d print PASS.</p>
4 <div id="log"></div>
5 <script>
6 function log(message) {
7 document.getElementById("log").innerHTML += message + "<br>";
8 }
9
10 if (window.layoutTestController) {
11 layoutTestController.dumpAsText();
12 layoutTestController.waitUntilDone();
13 }
14
15 var xhr = new XMLHttpRequest();
16 xhr.open("GET", "http://localhost:8000/xmlhttprequest/resources/access-control-p reflight-request-invalid-status.php?code=400");
17 xhr.setRequestHeader("X-Custom-Header", "PASS");
18 xhr.onerror = function () {
19 log("PASS");
20 if (window.layoutTestController)
21 layoutTestController.notifyDone();
22 };
23 xhr.onload = function () {
24 log("FAIL");
25 if (window.layoutTestController)
26 layoutTestController.notifyDone();
27 };
28 xhr.send();
29 </script>
30 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/xmlhttprequest/access-control-preflight-request-invalid-status-400-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698