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

Unified Diff: webrtc/logging/rtc_event_log/mock/mock_rtc_event_log.h

Issue 3012903002: Events - TODO_2
Patch Set: Created 3 years, 3 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
Index: webrtc/logging/rtc_event_log/mock/mock_rtc_event_log.h
diff --git a/webrtc/logging/rtc_event_log/mock/mock_rtc_event_log.h b/webrtc/logging/rtc_event_log/mock/mock_rtc_event_log.h
index 36d9e688f2682707997cf67e53276556e4b5fce1..444a5aa81c1c969ccf053966f89db114bd18d4f6 100644
--- a/webrtc/logging/rtc_event_log/mock/mock_rtc_event_log.h
+++ b/webrtc/logging/rtc_event_log/mock/mock_rtc_event_log.h
@@ -11,6 +11,7 @@
#ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_MOCK_MOCK_RTC_EVENT_LOG_H_
#define WEBRTC_LOGGING_RTC_EVENT_LOG_MOCK_MOCK_RTC_EVENT_LOG_H_
+#include <memory>
#include <string>
#include "webrtc/logging/rtc_event_log/rtc_event_log.h"
@@ -31,6 +32,14 @@ class MockRtcEventLog : public RtcEventLog {
MOCK_METHOD0(StopLogging, void());
+ // LogRtcEvent() can't be directly mocked because unique_ptr doesn't support
+ // copying; using a proxy-mock is the work-around. LogRtcEventProxy() is the
+ // function that should be used for EXPECT_CALL.
+ void LogRtcEvent(std::unique_ptr<RtcEvent> event) {
+ LogRtcEventProxy(event.get());
+ }
+ MOCK_METHOD1(LogRtcEventProxy, void(RtcEvent*));
+
MOCK_METHOD1(LogVideoReceiveStreamConfig,
void(const rtclog::StreamConfig& config));

Powered by Google App Engine
This is Rietveld 408576698