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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-xmlhttprequest-blocked.html

Issue 2456013002: CSP: 'connect-src' should not cause exceptions. (Closed)
Patch Set: Ugh. Created 3 years, 9 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 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta http-equiv="Content-Security-Policy" content="connect-src http://127.0.0.1 :8000">
5 <script>
6 if (window.testRunner)
7 testRunner.dumpAsText();
8 </script>
9 </head>
10 <body>
11 <pre id="console"></pre>
12 <script>
13 function log(msg)
14 {
15 document.getElementById("console").appendChild(document.createTextNode(msg + "\n"));
16 }
17
18 try {
19 var xhr = new XMLHttpRequest;
20 xhr.open("GET", "http://localhost:8000/xmlhttprequest/resources/get.txt", tr ue);
21 log("Fail");
22 } catch(e) {
23 log("Pass");
24 }
25
26 </script>
27 </body>
28 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698