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)); |