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

Unified Diff: chrome/common/extensions/csp_validator_unittest.cc

Issue 10873060: Adding 'blob:' and 'filesystem:' URLs as secure sources for extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adam's feedback. Created 8 years, 4 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
« no previous file with comments | « chrome/common/extensions/csp_validator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/csp_validator_unittest.cc
diff --git a/chrome/common/extensions/csp_validator_unittest.cc b/chrome/common/extensions/csp_validator_unittest.cc
index 4caab6d6f3bb6329e7986dcd6698f834c432e9b9..7063761c27ca2d067c45883b385e7c8d59e9b8ea 100644
--- a/chrome/common/extensions/csp_validator_unittest.cc
+++ b/chrome/common/extensions/csp_validator_unittest.cc
@@ -91,6 +91,15 @@ TEST(ExtensionCSPValidator, IsSecure) {
"default-src 'self' http://127.0.0.1.example.com"));
EXPECT_FALSE(ContentSecurityPolicyIsSecure(
"default-src 'self' http://localhost.example.com"));
+
+ EXPECT_TRUE(ContentSecurityPolicyIsSecure(
+ "default-src 'self' blob:"));
+ EXPECT_FALSE(ContentSecurityPolicyIsSecure(
+ "default-src 'self' blob:http://example.com/XXX"));
+ EXPECT_TRUE(ContentSecurityPolicyIsSecure(
+ "default-src 'self' filesystem:"));
+ EXPECT_FALSE(ContentSecurityPolicyIsSecure(
+ "default-src 'self' filesystem:http://example.com/XXX"));
}
TEST(ExtensionCSPValidator, IsSandboxed) {
« no previous file with comments | « chrome/common/extensions/csp_validator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698