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

Unified Diff: extensions/common/manifest_handlers/csp_info_unittest.cc

Issue 2563843002: Restrict app sandbox's CSP to disallow loading web content in them. (Closed)
Patch Set: sync @tott Created 3 years, 12 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: extensions/common/manifest_handlers/csp_info_unittest.cc
diff --git a/extensions/common/manifest_handlers/csp_info_unittest.cc b/extensions/common/manifest_handlers/csp_info_unittest.cc
index e6698fa2a41a2c4c178cb29cc42e21e36465c745..d2621ff3a7d4e5b8171e985f217f84ee0122af7e 100644
--- a/extensions/common/manifest_handlers/csp_info_unittest.cc
+++ b/extensions/common/manifest_handlers/csp_info_unittest.cc
@@ -34,12 +34,13 @@ TEST_F(CSPInfoUnitTest, SandboxedPages) {
LoadAndExpectSuccess("sandboxed_pages_valid_5.json"));
const char kSandboxedCSP[] =
- "sandbox allow-scripts allow-forms allow-popups allow-modals";
+ "sandbox allow-scripts allow-forms allow-popups allow-modals; "
+ "script-src 'self' 'unsafe-inline' 'unsafe-eval'; child-src 'self';";
const char kDefaultCSP[] =
"script-src 'self' blob: filesystem: chrome-extension-resource:; "
"object-src 'self' blob: filesystem:;";
const char kCustomSandboxedCSP[] =
- "sandbox; script-src: https://www.google.com";
+ "sandbox; script-src 'self'; child-src 'self';";
EXPECT_EQ(kSandboxedCSP, CSPInfo::GetResourceContentSecurityPolicy(
extension1.get(), "/test"));
« no previous file with comments | « extensions/common/csp_validator_unittest.cc ('k') | extensions/common/manifest_handlers/sandboxed_page_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698