OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_MOCK_MOCK_RTC_EVENT_LOG_H_ | 11 #ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_MOCK_MOCK_RTC_EVENT_LOG_H_ |
12 #define WEBRTC_LOGGING_RTC_EVENT_LOG_MOCK_MOCK_RTC_EVENT_LOG_H_ | 12 #define WEBRTC_LOGGING_RTC_EVENT_LOG_MOCK_MOCK_RTC_EVENT_LOG_H_ |
13 | 13 |
| 14 #include <memory> |
14 #include <string> | 15 #include <string> |
15 | 16 |
16 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" | 17 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" |
17 #include "webrtc/logging/rtc_event_log/rtc_stream_config.h" | 18 #include "webrtc/logging/rtc_event_log/rtc_stream_config.h" |
18 #include "webrtc/modules/audio_coding/audio_network_adaptor/include/audio_networ
k_adaptor.h" | 19 #include "webrtc/modules/audio_coding/audio_network_adaptor/include/audio_networ
k_adaptor.h" |
19 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h" | 20 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h" |
20 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h" | 21 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h" |
21 #include "webrtc/test/gmock.h" | 22 #include "webrtc/test/gmock.h" |
22 | 23 |
23 namespace webrtc { | 24 namespace webrtc { |
24 | 25 |
25 class MockRtcEventLog : public RtcEventLog { | 26 class MockRtcEventLog : public RtcEventLog { |
26 public: | 27 public: |
27 MOCK_METHOD2(StartLogging, | 28 MOCK_METHOD2(StartLogging, |
28 bool(const std::string& file_name, int64_t max_size_bytes)); | 29 bool(const std::string& file_name, int64_t max_size_bytes)); |
29 | 30 |
30 MOCK_METHOD2(StartLogging, | 31 MOCK_METHOD2(StartLogging, |
31 bool(rtc::PlatformFile log_file, int64_t max_size_bytes)); | 32 bool(rtc::PlatformFile log_file, int64_t max_size_bytes)); |
32 | 33 |
33 MOCK_METHOD0(StopLogging, void()); | 34 MOCK_METHOD0(StopLogging, void()); |
34 | 35 |
| 36 MOCK_METHOD1(LogProxy, void(RtcEvent*)); |
| 37 virtual void Log(std::unique_ptr<RtcEvent> event) { |
| 38 return LogProxy(event.get()); |
| 39 } |
| 40 |
35 MOCK_METHOD1(LogVideoReceiveStreamConfig, | 41 MOCK_METHOD1(LogVideoReceiveStreamConfig, |
36 void(const rtclog::StreamConfig& config)); | 42 void(const rtclog::StreamConfig& config)); |
37 | 43 |
38 MOCK_METHOD1(LogVideoSendStreamConfig, | 44 MOCK_METHOD1(LogVideoSendStreamConfig, |
39 void(const rtclog::StreamConfig& config)); | 45 void(const rtclog::StreamConfig& config)); |
40 | 46 |
41 MOCK_METHOD1(LogAudioReceiveStreamConfig, | 47 MOCK_METHOD1(LogAudioReceiveStreamConfig, |
42 void(const rtclog::StreamConfig& config)); | 48 void(const rtclog::StreamConfig& config)); |
43 | 49 |
44 MOCK_METHOD1(LogAudioSendStreamConfig, | 50 MOCK_METHOD1(LogAudioSendStreamConfig, |
(...skipping 27 matching lines...) Expand all Loading... |
72 void(int id, int bitrate_bps, int min_probes, int min_bytes)); | 78 void(int id, int bitrate_bps, int min_probes, int min_bytes)); |
73 | 79 |
74 MOCK_METHOD2(LogProbeResultSuccess, void(int id, int bitrate_bps)); | 80 MOCK_METHOD2(LogProbeResultSuccess, void(int id, int bitrate_bps)); |
75 MOCK_METHOD2(LogProbeResultFailure, | 81 MOCK_METHOD2(LogProbeResultFailure, |
76 void(int id, ProbeFailureReason failure_reason)); | 82 void(int id, ProbeFailureReason failure_reason)); |
77 }; | 83 }; |
78 | 84 |
79 } // namespace webrtc | 85 } // namespace webrtc |
80 | 86 |
81 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_MOCK_MOCK_RTC_EVENT_LOG_H_ | 87 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_MOCK_MOCK_RTC_EVENT_LOG_H_ |
OLD | NEW |