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

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

Issue 1229013004: 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script> 4 <script>
5 var req = new XMLHttpRequest(); 5 var req = new XMLHttpRequest();
6 req.open('GET', location); 6 req.open('GET', location);
7 req.onerror = function() { 7 try {
8 window.parent.postMessage('PASS', '*'); 8 req.send();
9 window.parent.postMessage('FAIL', '*');
10 } catch (e) {
11 window.parent.postMessage(e.name, '*');
9 } 12 }
10 req.send();
11 </script> 13 </script>
12 </head> 14 </head>
13 <body> 15 <body>
14 Documents loaded from file: shouldn't be able to access themselves via XHR. 16 Documents loaded from file: shouldn't be able to access themselves via XHR.
15 </body> 17 </body>
16 </html> 18 </html>
OLDNEW
« 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