| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <string> |
| 6 |
| 5 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 6 #include "base/values.h" | 8 #include "base/values.h" |
| 7 #include "extensions/common/event_filter.h" | 9 #include "extensions/common/event_filter.h" |
| 8 #include "extensions/common/event_filtering_info.h" | 10 #include "extensions/common/event_filtering_info.h" |
| 9 #include "extensions/common/event_matcher.h" | 11 #include "extensions/common/event_matcher.h" |
| 10 #include "ipc/ipc_message.h" | 12 #include "ipc/ipc_message.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 14 |
| 13 using base::DictionaryValue; | 15 using base::DictionaryValue; |
| 14 using base::ListValue; | 16 using base::ListValue; |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 scoped_ptr<EventMatcher> matcher(MatcherFromURLFilterList(ValueAsList( | 250 scoped_ptr<EventMatcher> matcher(MatcherFromURLFilterList(ValueAsList( |
| 249 scoped_ptr<Value>(new DictionaryValue())))); | 251 scoped_ptr<Value>(new DictionaryValue())))); |
| 250 int id = event_filter_.AddEventMatcher("event1", matcher.Pass()); | 252 int id = event_filter_.AddEventMatcher("event1", matcher.Pass()); |
| 251 std::set<int> matches = event_filter_.MatchEvent( | 253 std::set<int> matches = event_filter_.MatchEvent( |
| 252 "event1", empty_url_event_, MSG_ROUTING_NONE); | 254 "event1", empty_url_event_, MSG_ROUTING_NONE); |
| 253 ASSERT_EQ(1u, matches.size()); | 255 ASSERT_EQ(1u, matches.size()); |
| 254 ASSERT_EQ(1u, matches.count(id)); | 256 ASSERT_EQ(1u, matches.count(id)); |
| 255 } | 257 } |
| 256 | 258 |
| 257 } // namespace extensions | 259 } // namespace extensions |
| OLD | NEW |