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

Unified Diff: LayoutTests/security/resources/cannot-read-self-from-file.html

Issue 1240503004: Revert of [XMLHttpRequest] Stop throwing for network error in async mode (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/security/cannot-read-self-from-file.html ('k') | Source/core/xmlhttprequest/XMLHttpRequest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/security/resources/cannot-read-self-from-file.html
diff --git a/LayoutTests/security/resources/cannot-read-self-from-file.html b/LayoutTests/security/resources/cannot-read-self-from-file.html
index 9851f156af272c575aaf74bd6180dbc9fe278ac7..d380284c51226a086a9bb2bb68c11bd4bc3246c6 100644
--- a/LayoutTests/security/resources/cannot-read-self-from-file.html
+++ b/LayoutTests/security/resources/cannot-read-self-from-file.html
@@ -4,10 +4,12 @@
<script>
var req = new XMLHttpRequest();
req.open('GET', location);
-req.onerror = function() {
- window.parent.postMessage('PASS', '*');
+try {
+ req.send();
+ window.parent.postMessage('FAIL', '*');
+} catch (e) {
+ window.parent.postMessage(e.name, '*');
}
-req.send();
</script>
</head>
<body>
« no previous file with comments | « LayoutTests/security/cannot-read-self-from-file.html ('k') | Source/core/xmlhttprequest/XMLHttpRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698