Chromium Code Reviews| Index: extensions/common/url_pattern_set_unittest.cc |
| diff --git a/extensions/common/url_pattern_set_unittest.cc b/extensions/common/url_pattern_set_unittest.cc |
| index 1ad223ec53ac86db9deacef6d258330d7ceac03b..b0ad1f2bcd1c794bfece06dd5cf8a363d92bd6b4 100644 |
| --- a/extensions/common/url_pattern_set_unittest.cc |
| +++ b/extensions/common/url_pattern_set_unittest.cc |
| @@ -421,4 +421,18 @@ TEST(URLPatternSetTest, NwayUnion) { |
| } |
| } |
| +TEST(URLPatternSetTest, AddOrigin) { |
| + URLPatternSet set; |
| + set.AddOrigin(URLPattern::SCHEME_ALL, GURL("https://www.google.com/")); |
|
not at google - send to devlin
2014/08/14 23:04:48
Huh, I would have thought ToOrigin of google.com/
|
| + EXPECT_TRUE(set.MatchesURL(GURL("https://www.google.com/foo/bar"))); |
| + EXPECT_FALSE(set.MatchesURL(GURL("http://www.google.com/foo/bar"))); |
| + EXPECT_FALSE(set.MatchesURL(GURL("https://en.google.com/foo/bar"))); |
| + set.ClearPatterns(); |
| + |
| + set.AddOrigin(URLPattern::SCHEME_ALL, GURL("http://en.foo.com/")); |
|
not at google - send to devlin
2014/08/14 23:04:48
there's no difference between this and the google.
gpdavis
2014/08/14 23:31:33
Sure, I can do that.
|
| + EXPECT_TRUE(set.MatchesURL(GURL("http://en.foo.com/bar"))); |
| + EXPECT_FALSE(set.MatchesURL(GURL("https://www.foo.com/"))); |
| + EXPECT_FALSE(set.MatchesURL(GURL("http://www.foo.com/"))); |
| +} |
| + |
| } // namespace extensions |