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

Unified Diff: third_party/WebKit/Source/core/frame/csp/CSPSourceTest.cpp

Issue 2705193003: Investigated cause of failing tests for non-standard-scheme matching (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/csp/CSPSourceTest.cpp
diff --git a/third_party/WebKit/Source/core/frame/csp/CSPSourceTest.cpp b/third_party/WebKit/Source/core/frame/csp/CSPSourceTest.cpp
index 36590e967f0e74f4dc1ee7c7612860e6909f09eb..161c1e3e4e7eba900e828c8256799cdfdcdd3fff 100644
--- a/third_party/WebKit/Source/core/frame/csp/CSPSourceTest.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/CSPSourceTest.cpp
@@ -187,11 +187,13 @@ TEST_F(CSPSourceTest, SchemeIsEmpty) {
*SecurityOrigin::createFromString("non-standard-scheme://a.com/"));
CSPSource source(csp.get(), "", "a.com", 0, "/", CSPSource::NoWildcard,
CSPSource::NoWildcard);
- // TODO(mkwst, arthursonzogni): This result might be wrong.
- // See http://crbug.com/692449
EXPECT_FALSE(source.matches(KURL(base, "http://a.com")));
- // TODO(mkwst, arthursonzogni): This result might be wrong.
- // See http://crbug.com/692449
+
+ // The reason matching fails is because the host is parsed as "" when
+ // using a non standard scheme even though it should be parsed as "a.com"
+ // After adding it to the list of standard schemes it now gets parsed
+ // correctly. This does not matter in practice though because there is
+ // no way to render/load anything like "non-standard-scheme://a.com"
EXPECT_FALSE(source.matches(KURL(base, "non-standard-scheme://a.com")));
andypaicu 2017/02/22 10:03:11 Raised bug about this 694959
Mike West 2017/02/22 15:38:44 I'd suggest that you actually add the scheme as st
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698