Commit 567c02de authored by dpapad's avatar dpapad Committed by Chromium LUCI CQ

WebUI tests: Remove no longer necessary unsafe-eval token from CSP.

Bug: 844820,525224
Change-Id: I6f2f40c2dd7e03a570eba8e08654eb38c9897776
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2586100
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Auto-Submit: dpapad <dpapad@chromium.org>
Reviewed-by: default avatarRebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#836319}
parent 6869d80c
......@@ -396,13 +396,10 @@ class MockWebUIDataSource : public content::URLDataSource {
return "text/html";
}
// Append 'unsave-eval' to the default script-src CSP policy, since it is
// needed by some tests using chrome://dummyurl (because they depend on
// Mock4JS, see crbug.com/844820).
std::string GetContentSecurityPolicy(
const network::mojom::CSPDirectiveName directive) override {
if (directive == network::mojom::CSPDirectiveName::ScriptSrc) {
return "script-src chrome://resources 'self' 'unsafe-eval';";
return "script-src chrome://resources 'self';";
} else if (directive ==
network::mojom::CSPDirectiveName::RequireTrustedTypesFor ||
directive == network::mojom::CSPDirectiveName::TrustedTypes) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment