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

Unified Diff: LayoutTests/http/tests/security/contentSecurityPolicy/shared-worker-connect-src-allowed.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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/security/contentSecurityPolicy/shared-worker-connect-src-allowed.html
diff --git a/LayoutTests/http/tests/security/contentSecurityPolicy/shared-worker-connect-src-allowed.html b/LayoutTests/http/tests/security/contentSecurityPolicy/shared-worker-connect-src-allowed.html
index 8174f6d771737bf7a4eef6ff70adb545fb1bd0f9..29f14f982be29c38fa28423774b26fbfa1a9d497 100644
--- a/LayoutTests/http/tests/security/contentSecurityPolicy/shared-worker-connect-src-allowed.html
+++ b/LayoutTests/http/tests/security/contentSecurityPolicy/shared-worker-connect-src-allowed.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
-<meta http-equiv="Content-Security-Policy" content="connect-src http://127.0.0.1:8000"/>
+<meta http-equiv="Content-Security-Policy" content="connect-src 'none'"/>
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
@@ -12,7 +12,8 @@ if (window.testRunner) {
<body>
<script>
try {
- var worker = new SharedWorker('http://127.0.0.1:8000/security/contentSecurityPolicy/resources/shared-worker-make-xhr.js');
+ var worker = new SharedWorker('http://127.0.0.1:8000/security/contentSecurityPolicy/resources/worker.php?type=shared-make-xhr&csp=' +
+ encodeURIComponent("connect-src http://127.0.0.1:8000"));
worker.port.onmessage = function (event) {
alert(event.data);
if (window.testRunner)

Powered by Google App Engine
This is Rietveld 408576698