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

Side by Side Diff: webrtc/logging/rtc_event_log/mock/mock_rtc_event_log.h

Issue 3010263002: Events - backup
Patch Set: Compiles 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 unified diff | Download patch
OLDNEW
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/modules/audio_coding/audio_network_adaptor/include/audio_networ k_adaptor.h" 18 #include "webrtc/modules/audio_coding/audio_network_adaptor/include/audio_networ k_adaptor.h"
18 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h" 19 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h"
19 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h" 20 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h"
20 #include "webrtc/test/gmock.h" 21 #include "webrtc/test/gmock.h"
21 22
22 namespace webrtc { 23 namespace webrtc {
23 24
24 class MockRtcEventLog : public RtcEventLog { 25 class MockRtcEventLog : public RtcEventLog {
25 public: 26 public:
26 MOCK_METHOD2(StartLogging, 27 MOCK_METHOD2(StartLogging,
27 bool(const std::string& file_name, int64_t max_size_bytes)); 28 bool(const std::string& file_name, int64_t max_size_bytes));
28 29
29 MOCK_METHOD2(StartLogging, 30 MOCK_METHOD2(StartLogging,
30 bool(rtc::PlatformFile log_file, int64_t max_size_bytes)); 31 bool(rtc::PlatformFile log_file, int64_t max_size_bytes));
31 32
32 MOCK_METHOD0(StopLogging, void()); 33 MOCK_METHOD0(StopLogging, void());
33 34
35 // Can't be directly mocked because unique_ptr doesn't support copying;
36 // using a proxy-mock is the work-around.
37 void LogRtcEvent(std::unique_ptr<RtcEvent> event) {
38 LogRtcEventProxy(event.get());
39 }
40 // TODO(eladalon): !!! private instead?
41 MOCK_METHOD1(LogRtcEventProxy, void(RtcEvent*));
42
34 MOCK_METHOD1(LogVideoReceiveStreamConfig, 43 MOCK_METHOD1(LogVideoReceiveStreamConfig,
35 void(const rtclog::StreamConfig& config)); 44 void(const rtclog::StreamConfig& config));
36 45
37 MOCK_METHOD1(LogVideoSendStreamConfig, 46 MOCK_METHOD1(LogVideoSendStreamConfig,
38 void(const rtclog::StreamConfig& config)); 47 void(const rtclog::StreamConfig& config));
39 48
40 MOCK_METHOD1(LogAudioReceiveStreamConfig, 49 MOCK_METHOD1(LogAudioReceiveStreamConfig,
41 void(const rtclog::StreamConfig& config)); 50 void(const rtclog::StreamConfig& config));
42 51
43 MOCK_METHOD1(LogAudioSendStreamConfig, 52 MOCK_METHOD1(LogAudioSendStreamConfig,
(...skipping 27 matching lines...) Expand all
71 void(int id, int bitrate_bps, int min_probes, int min_bytes)); 80 void(int id, int bitrate_bps, int min_probes, int min_bytes));
72 81
73 MOCK_METHOD2(LogProbeResultSuccess, void(int id, int bitrate_bps)); 82 MOCK_METHOD2(LogProbeResultSuccess, void(int id, int bitrate_bps));
74 MOCK_METHOD2(LogProbeResultFailure, 83 MOCK_METHOD2(LogProbeResultFailure,
75 void(int id, ProbeFailureReason failure_reason)); 84 void(int id, ProbeFailureReason failure_reason));
76 }; 85 };
77 86
78 } // namespace webrtc 87 } // namespace webrtc
79 88
80 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_MOCK_MOCK_RTC_EVENT_LOG_H_ 89 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_MOCK_MOCK_RTC_EVENT_LOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698