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

Side by Side Diff: LayoutTests/http/tests/security/contentSecurityPolicy/shared-worker-connect-src-blocked.html

Issue 1128813003: Give shared workers their own content security policies (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 7 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 <meta http-equiv="Content-Security-Policy" content="connect-src 'none'"/> 4 <meta http-equiv="Content-Security-Policy" content="connect-src 'none'"/>
5 <script> 5 <script>
6 if (window.testRunner) { 6 if (window.testRunner) {
7 testRunner.waitUntilDone(); 7 testRunner.waitUntilDone();
8 testRunner.dumpAsText(); 8 testRunner.dumpAsText();
9 } 9 }
10 </script> 10 </script>
11 </head> 11 </head>
12 <body> 12 <body>
13 <script> 13 <script>
14 try { 14 try {
15 var worker = new SharedWorker('http://127.0.0.1:8000/security/contentSecurit yPolicy/resources/shared-worker-make-xhr.js'); 15 var worker = new SharedWorker('http://127.0.0.1:8000/security/contentSecurit yPolicy/resources/worker.php?type=shared-make-xhr&csp=' +
16 encodeURIComponent("connect-src 'none'"));
16 worker.port.onmessage = function (event) { 17 worker.port.onmessage = function (event) {
17 alert(event.data); 18 alert(event.data);
18 if (window.testRunner) 19 if (window.testRunner)
19 testRunner.notifyDone(); 20 testRunner.notifyDone();
20 }; 21 };
21 } catch (e) { 22 } catch (e) {
22 alert(e); 23 alert(e);
23 if (window.testRunner) 24 if (window.testRunner)
24 testRunner.notifyDone(); 25 testRunner.notifyDone();
25 } 26 }
26 </script> 27 </script>
27 </body> 28 </body>
28 </html> 29 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698