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

Unified Diff: Source/core/frame/csp/CSPSourceListTest.cpp

Issue 1362813002: CSP source *.x.y should not match host x.y (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Test fixes Created 5 years, 3 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 | « Source/core/frame/csp/CSPSource.cpp ('k') | Source/core/frame/csp/CSPSourceTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/csp/CSPSourceListTest.cpp
diff --git a/Source/core/frame/csp/CSPSourceListTest.cpp b/Source/core/frame/csp/CSPSourceListTest.cpp
index 7c49fe2cffb438fbc978d700342b4524809c715a..88b1f2e1c246729e183b58eb73a965c061ffc843 100644
--- a/Source/core/frame/csp/CSPSourceListTest.cpp
+++ b/Source/core/frame/csp/CSPSourceListTest.cpp
@@ -126,7 +126,6 @@ TEST_F(CSPSourceListTest, WildcardMatching)
EXPECT_TRUE(sourceList.matches(KURL(base, "http://example1.com:8000/foo/")));
EXPECT_TRUE(sourceList.matches(KURL(base, "http://example1.com:9000/foo/")));
EXPECT_TRUE(sourceList.matches(KURL(base, "https://foo.example2.com/bar/")));
- EXPECT_TRUE(sourceList.matches(KURL(base, "https://example2.com/bar/")));
EXPECT_TRUE(sourceList.matches(KURL(base, "http://foo.test/")));
EXPECT_TRUE(sourceList.matches(KURL(base, "http://foo.bar.test/")));
@@ -136,6 +135,8 @@ TEST_F(CSPSourceListTest, WildcardMatching)
EXPECT_FALSE(sourceList.matches(KURL(base, "https://example2.foo.com/bar")));
EXPECT_FALSE(sourceList.matches(KURL(base, "https://foo.test/")));
EXPECT_FALSE(sourceList.matches(KURL(base, "http://foo.test.bar/")));
+ EXPECT_FALSE(sourceList.matches(KURL(base, "https://example2.com/bar/")));
+ EXPECT_FALSE(sourceList.matches(KURL(base, "http://test/")));
}
TEST_F(CSPSourceListTest, RedirectMatching)
« no previous file with comments | « Source/core/frame/csp/CSPSource.cpp ('k') | Source/core/frame/csp/CSPSourceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698