Lines Matching defs:set

17 void AddPattern(URLPatternSet* set, const std::string& pattern) {
19 set->AddPattern(URLPattern(schemes, pattern));
23 URLPatternSet set;
24 AddPattern(&set, pattern);
25 return set;
30 URLPatternSet set;
31 AddPattern(&set, pattern1);
32 AddPattern(&set, pattern2);
33 return set;
39 URLPatternSet set;
40 EXPECT_FALSE(set.MatchesURL(GURL("http://www.foo.com/bar")));
41 EXPECT_FALSE(set.MatchesURL(GURL()));
42 EXPECT_FALSE(set.MatchesURL(GURL("invalid")));
46 URLPatternSet set;
47 AddPattern(&set, "http://www.google.com/*");
49 EXPECT_TRUE(set.MatchesURL(GURL("http://www.google.com/")));
50 EXPECT_TRUE(set.MatchesURL(GURL("http://www.google.com/monkey")));
51 EXPECT_FALSE(set.MatchesURL(GURL("https://www.google.com/")));
52 EXPECT_FALSE(set.MatchesURL(GURL("https://www.microsoft.com/")));
56 URLPatternSet set;
57 AddPattern(&set, "http://www.google.com/*");
58 AddPattern(&set, "http://www.yahoo.com/*");
60 EXPECT_TRUE(set.MatchesURL(GURL("http://www.google.com/monkey")));
61 EXPECT_TRUE(set.MatchesURL(GURL("http://www.yahoo.com/monkey")));
62 EXPECT_FALSE(set.MatchesURL(GURL("https://www.apple.com/monkey")));
66 URLPatternSet set;
69 stream << set;
74 URLPatternSet set;
75 AddPattern(&set, "http://www.google.com/*");
78 stream << set;
83 URLPatternSet set;
84 AddPattern(&set, "http://www.google.com/*");
85 AddPattern(&set, "http://www.yahoo.com/*");
88 stream << set;
120 // Subtract an empty set.
125 // Subtract a real set.
152 // Intersection with an empty set.
161 // Intersection with a real set.
188 // Union with an empty set.
193 // Union with a real set.
425 URLPatternSet set;
426 EXPECT_TRUE(set.AddOrigin(
428 EXPECT_TRUE(set.MatchesURL(GURL("https://www.google.com/foo/bar")));
429 EXPECT_FALSE(set.MatchesURL(GURL("http://www.google.com/foo/bar")));
430 EXPECT_FALSE(set.MatchesURL(GURL("https://en.google.com/foo/bar")));
431 set.ClearPatterns();
433 EXPECT_TRUE(set.AddOrigin(
435 EXPECT_FALSE(set.MatchesURL(GURL("https://www.google.com/foo/bar")));
436 EXPECT_TRUE(set.MatchesURL(GURL("https://google.com/foo/bar")));
438 EXPECT_FALSE(set.AddOrigin(