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

Unified Diff: extensions/common/csp_validator_unittest.cc

Issue 722233004: Accept invalid chrome-extension:// and chrome:// CSP tokens (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify patch - just accept any empty host Created 6 years, 1 month 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 | « extensions/common/csp_validator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/csp_validator_unittest.cc
diff --git a/extensions/common/csp_validator_unittest.cc b/extensions/common/csp_validator_unittest.cc
index 9778a5a22d671a41f769b9a9cbedebe9a2f7b2a0..741007fdbbd6584d525909e9858678227be77986 100644
--- a/extensions/common/csp_validator_unittest.cc
+++ b/extensions/common/csp_validator_unittest.cc
@@ -98,7 +98,7 @@ TEST(ExtensionCSPValidator, IsSecure) {
"default-src 'self' *:*/", Manifest::TYPE_EXTENSION));
EXPECT_FALSE(ContentSecurityPolicyIsSecure(
"default-src 'self' *:*/path", Manifest::TYPE_EXTENSION));
- EXPECT_FALSE(ContentSecurityPolicyIsSecure(
+ EXPECT_TRUE(ContentSecurityPolicyIsSecure(
not at google - send to devlin 2014/11/19 17:36:55 Explain why this is secure (and link to the bug).
"default-src 'self' https://", Manifest::TYPE_EXTENSION));
EXPECT_FALSE(ContentSecurityPolicyIsSecure(
"default-src 'self' https://*:*", Manifest::TYPE_EXTENSION));
@@ -167,6 +167,8 @@ TEST(ExtensionCSPValidator, IsSecure) {
"default-src 'self' https://*.googleapis.com", Manifest::TYPE_EXTENSION));
EXPECT_TRUE(ContentSecurityPolicyIsSecure(
"default-src 'self' https://x.googleapis.com", Manifest::TYPE_EXTENSION));
+ EXPECT_TRUE(ContentSecurityPolicyIsSecure(
not at google - send to devlin 2014/11/19 17:36:55 Ditto.
+ "default-src 'self' chrome-extension://", Manifest::TYPE_EXTENSION));
}
TEST(ExtensionCSPValidator, IsSandboxed) {
« no previous file with comments | « extensions/common/csp_validator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698