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

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

Issue 149619: Various minor extension fixes (Closed)
Patch Set: One more test Created 11 years, 5 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: chrome/common/extensions/url_pattern_unittest.cc
diff --git a/chrome/common/extensions/url_pattern_unittest.cc b/chrome/common/extensions/url_pattern_unittest.cc
index 3db623f0012fcab8bd14597047ba77abe2b0f4bd..f3fec47ed6e39e211236f2c1de94ce4aa5444979 100644
--- a/chrome/common/extensions/url_pattern_unittest.cc
+++ b/chrome/common/extensions/url_pattern_unittest.cc
@@ -16,6 +16,7 @@ TEST(URLPatternTest, ParseInvalid) {
"http://foo.*.bar/baz", // must be first component
"http:/bar", // scheme separator not found
"foo://*", // invalid scheme
+ "chrome://*/*", // we don't support internal chrome URLs
};
for (size_t i = 0; i < arraysize(kInvalidPatterns); ++i) {
@@ -67,19 +68,6 @@ TEST(URLPatternTest, Match3) {
EXPECT_FALSE(pattern.MatchesUrl(GURL("http://yahoo.com/foobar")));
}
-// odd schemes and normalization
-TEST(URLPatternTest, Match4) {
- URLPattern pattern;
- EXPECT_TRUE(pattern.Parse("chrome://thinger/*"));
- EXPECT_EQ("chrome", pattern.scheme());
- EXPECT_EQ("thinger", pattern.host());
- EXPECT_FALSE(pattern.match_subdomains());
- EXPECT_EQ("/*", pattern.path());
- EXPECT_TRUE(pattern.MatchesUrl(GURL("chrome://thinger/foobar")));
- EXPECT_TRUE(pattern.MatchesUrl(GURL("CHROME://thinger/")));
- EXPECT_FALSE(pattern.MatchesUrl(GURL("http://thinger/")));
-}
-
// glob escaping
TEST(URLPatternTest, Match5) {
URLPattern pattern;

Powered by Google App Engine
This is Rietveld 408576698