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

Unified Diff: ceee/ie/plugin/bho/events_funnel_unittest.cc

Issue 4989002: Firing event to broker without worker thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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
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));

Powered by Google App Engine
This is Rietveld 408576698