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

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

Issue 8138004: Fix issues related to <all_urls> in extensions. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: make the plugin.dll empty so it loads everywhere Created 9 years, 2 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 5c72a058d558fb899da9a861ae4dfd1a4b94f3cc..a78554f79a6046b697b23b5e2847e9ac372dbff9 100644
--- a/chrome/common/extensions/url_pattern_unittest.cc
+++ b/chrome/common/extensions/url_pattern_unittest.cc
@@ -295,6 +295,19 @@ TEST(ExtensionURLPatternTest, Match11) {
EXPECT_TRUE(pattern.MatchesURL(GURL("http://127.0.0.1")));
EXPECT_TRUE(pattern.MatchesURL(GURL("file:///foo/bar")));
EXPECT_TRUE(pattern.MatchesURL(GURL("file://localhost/foo/bar")));
+
+ // Make sure the properties are the same when creating an <all_urls> pattern
+ // via SetMatchAllURLs and by parsing <all_urls>.
+ URLPattern pattern2(kAllSchemes);
+ pattern2.SetMatchAllURLs(true);
+
+ EXPECT_EQ(pattern.valid_schemes(), pattern2.valid_schemes());
+ EXPECT_EQ(pattern.match_subdomains(), pattern2.match_subdomains());
+ EXPECT_EQ(pattern.path(), pattern2.path());
+ EXPECT_EQ(pattern.match_all_urls(), pattern2.match_all_urls());
+ EXPECT_EQ(pattern.scheme(), pattern2.scheme());
+ EXPECT_EQ(pattern.port(), pattern2.port());
+ EXPECT_EQ(pattern.GetAsString(), pattern2.GetAsString());
};
// SCHEME_ALL matches all schemes.

Powered by Google App Engine
This is Rietveld 408576698