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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/worker-eval-blocked.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/worker-eval-blocked.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/worker-eval-blocked.html b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/worker-eval-blocked.html
index 2c1dd12adcedae08a6474758844e707f0dd61ccf..9c61b2bd44d75070177a14649c5060295f8ae52b 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/worker-eval-blocked.html
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/worker-eval-blocked.html
@@ -20,10 +20,12 @@ function runWorkerTest(type, policy, expectation) {
fetch_tests_from_worker(worker);
}
}
-runWorkerTest("eval", "script-src 'none'", { "none": "blocked" });
-runWorkerTest("eval", "default-src 'none'", { "none": "blocked" });
-runWorkerTest("eval", "script-src 'self'", "blocked");
-runWorkerTest("eval", "default-src 'self'", "blocked");
+
+// The policy delivered with the worker does not affect the worker context.
+runWorkerTest("eval", "script-src 'none'", { "none": "allowed" });
+runWorkerTest("eval", "default-src 'none'", { "none": "allowed" });
+runWorkerTest("eval", "script-src 'self'", "allowed");
+runWorkerTest("eval", "default-src 'self'", "allowed");
runWorkerTest("eval", "script-src 'self' 'unsafe-eval'", "allowed");
runWorkerTest("eval", "default-src 'self' 'unsafe-eval'", "allowed");
</script>

Powered by Google App Engine
This is Rietveld 408576698