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

Unified Diff: extensions/common/event_filter_unittest.cc

Issue 2937623002: [Extensions] Simplify EventFilteringInfo (Closed)
Patch Set: karan's Created 3 years, 6 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 | « extensions/common/event_filter.cc ('k') | extensions/common/event_filtering_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/event_filter_unittest.cc
diff --git a/extensions/common/event_filter_unittest.cc b/extensions/common/event_filter_unittest.cc
index b9b34a37fbed7ad79fe024ed33ca9d88cca9f5fa..9cbfff7fb659a5760059d8d51b0333d141a054f7 100644
--- a/extensions/common/event_filter_unittest.cc
+++ b/extensions/common/event_filter_unittest.cc
@@ -24,10 +24,10 @@ namespace extensions {
class EventFilterUnittest : public testing::Test {
public:
EventFilterUnittest() {
- google_event_.SetURL(GURL("http://google.com"));
- yahoo_event_.SetURL(GURL("http://yahoo.com"));
- random_url_event_.SetURL(GURL("http://www.something-else.com"));
- empty_url_event_.SetURL(GURL());
+ google_event_.url = GURL("http://google.com");
+ yahoo_event_.url = GURL("http://yahoo.com");
+ random_url_event_.url = GURL("http://www.something-else.com");
+ empty_url_event_.url = GURL();
}
protected:
@@ -100,7 +100,7 @@ TEST_F(EventFilterUnittest, DoMatchAgainstMatchersForSameEvent) {
TEST_F(EventFilterUnittest, DontMatchUnlessMatcherMatches) {
EventFilteringInfo info;
- info.SetURL(GURL("http://www.yahoo.com"));
+ info.url = GURL("http://www.yahoo.com");
event_filter_.AddEventMatcher("event1", HostSuffixMatcher("google.com"));
std::set<int> matches = event_filter_.MatchEvent(
"event1", info, MSG_ROUTING_NONE);
@@ -128,7 +128,7 @@ TEST_F(EventFilterUnittest, MultipleEventMatches) {
TEST_F(EventFilterUnittest, TestURLMatching) {
EventFilteringInfo info;
- info.SetURL(GURL("http://www.google.com"));
+ info.url = GURL("http://www.google.com");
int id = event_filter_.AddEventMatcher("event1",
HostSuffixMatcher("google.com"));
std::set<int> matches = event_filter_.MatchEvent(
« no previous file with comments | « extensions/common/event_filter.cc ('k') | extensions/common/event_filtering_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698