Chromium Code Reviews| Index: ceee/ie/plugin/bho/events_funnel_unittest.cc |
| =================================================================== |
| --- ceee/ie/plugin/bho/events_funnel_unittest.cc (revision 66617) |
| +++ ceee/ie/plugin/bho/events_funnel_unittest.cc (working copy) |
| @@ -16,29 +16,19 @@ |
| using testing::StrEq; |
| -MOCK_STATIC_CLASS_BEGIN(MockCeeeModuleUtils) |
| - MOCK_STATIC_INIT_BEGIN(MockCeeeModuleUtils) |
| - MOCK_STATIC_INIT2(ceee_module_util::FireEventToBroker, |
|
Sigurður Ásgeirsson
2010/11/19 18:29:30
Excellent! :D
|
| - FireEventToBroker); |
| - MOCK_STATIC_INIT_END() |
| - MOCK_STATIC2(void, , FireEventToBroker, const std::string&, |
| - const std::string&); |
| -MOCK_STATIC_CLASS_END(MockCeeeModuleUtils) |
| - |
| // Test subclass used to provide access to protected functionality in the |
| // EventsFunnel class. |
| class TestEventsFunnel : public EventsFunnel { |
| public: |
| - TestEventsFunnel() : EventsFunnel(true) {} |
| - |
| HRESULT CallSendEvent(const char* event_name, const Value& event_args) { |
| return SendEvent(event_name, event_args); |
| } |
| + |
| + MOCK_METHOD2(SendEventToBroker, HRESULT(const char*, const char*)); |
| }; |
| TEST(EventsFunnelTest, SendEvent) { |
| TestEventsFunnel events_funnel; |
| - MockCeeeModuleUtils mock_ceee_module; |
| static const char* kEventName = "MADness"; |
| DictionaryValue event_args; |
| @@ -53,7 +43,7 @@ |
| std::string event_args_str; |
| base::JSONWriter::Write(&args_list, false, &event_args_str); |
| - EXPECT_CALL(mock_ceee_module, FireEventToBroker(StrEq(kEventName), |
| + EXPECT_CALL(events_funnel, SendEventToBroker(StrEq(kEventName), |
| StrEq(event_args_str))).Times(1); |
| EXPECT_HRESULT_SUCCEEDED( |
| events_funnel.CallSendEvent(kEventName, event_args)); |