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

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

Issue 2540983003: CSP: Dedicated workers always inherit policy. (Closed)
Patch Set: Rebase. 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.waitUntilDone();
8 testRunner.dumpAsText();
9 }
10 </script>
11 </head>
12 <body>
13 <script>
14 try {
15 var worker = new Worker('http://127.0.0.1:8000/security/contentSecurityPolic y/resources/worker.php?type=make-xhr&csp=' +
16 encodeURIComponent("connect-src http://127.0.0.1:80 00"));
17 worker.onmessage = function (event) {
18 alert(event.data);
19 if (window.testRunner)
20 testRunner.notifyDone();
21 };
22 } catch (e) {
23 alert(e);
24 if (window.testRunner)
25 testRunner.notifyDone();
26 }
27 </script>
28 </body>
29 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698