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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/worker-eval-blocked.html

Issue 2765443003: CSP: Upstream worker tests to WPT repository. (Closed)
Patch Set: 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
deleted file mode 100644
index 9c61b2bd44d75070177a14649c5060295f8ae52b..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/worker-eval-blocked.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-</head>
-<body>
-<script>
-function runWorkerTest(type, policy, expectation) {
- policy = encodeURIComponent(policy);
- if (expectation.none) {
- var worker = new Worker("./resources/worker-testharness.php?csp=" + policy + "&type=" + type + "&expectation=none");
- async_test(function (t) {
- worker.onmessage = t.step_func_done(function (e) {
- assert_equals(e.data.state, expectation.none);
- });
- }, type + " " + expectation.none + " for '" + policy + "'");
- } else {
- var worker = new Worker("./resources/worker-testharness.php?csp=" + policy + "&type=" + type + "&expectation=" + expectation);
- fetch_tests_from_worker(worker);
- }
-}
-
-// 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>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698