OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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_MODULES_CONGESTION_CONTROLLER_INCLUDE_MOCK_MOCK_CONGESTION_CONTRO
LLER_H_ | 11 #ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_MOCK_MOCK_CONGESTION_CONTRO
LLER_H_ |
12 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_MOCK_MOCK_CONGESTION_CONTRO
LLER_H_ | 12 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_MOCK_MOCK_CONGESTION_CONTRO
LLER_H_ |
13 | 13 |
14 #include "webrtc/base/constructormagic.h" | 14 #include "webrtc/base/constructormagic.h" |
15 #include "webrtc/base/socket.h" | 15 #include "webrtc/base/socket.h" |
16 #include "webrtc/modules/congestion_controller/include/congestion_controller.h" | 16 #include "webrtc/modules/congestion_controller/include/congestion_controller.h" |
| 17 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h" |
17 #include "webrtc/test/gmock.h" | 18 #include "webrtc/test/gmock.h" |
18 | 19 |
19 namespace webrtc { | 20 namespace webrtc { |
20 namespace test { | 21 namespace test { |
21 | 22 |
22 class MockCongestionObserver : public CongestionController::Observer { | 23 class MockCongestionObserver : public CongestionController::Observer { |
23 public: | 24 public: |
24 // TODO(minyue): remove this when old OnNetworkChanged is deprecated. See | 25 // TODO(minyue): remove this when old OnNetworkChanged is deprecated. See |
25 // https://bugs.chromium.org/p/webrtc/issues/detail?id=6796 | 26 // https://bugs.chromium.org/p/webrtc/issues/detail?id=6796 |
26 using CongestionController::Observer::OnNetworkChanged; | 27 using CongestionController::Observer::OnNetworkChanged; |
(...skipping 10 matching lines...) Expand all Loading... |
37 MockCongestionController(Clock* clock, | 38 MockCongestionController(Clock* clock, |
38 Observer* observer, | 39 Observer* observer, |
39 RemoteBitrateObserver* remote_bitrate_observer, | 40 RemoteBitrateObserver* remote_bitrate_observer, |
40 RtcEventLog* event_log, | 41 RtcEventLog* event_log, |
41 PacketRouter* packet_router) | 42 PacketRouter* packet_router) |
42 : CongestionController(clock, | 43 : CongestionController(clock, |
43 observer, | 44 observer, |
44 remote_bitrate_observer, | 45 remote_bitrate_observer, |
45 event_log, | 46 event_log, |
46 packet_router) {} | 47 packet_router) {} |
| 48 MOCK_METHOD1(NotifyBweOfReceivedPacket, |
| 49 void(const RtpPacketReceived& packet)); |
47 MOCK_METHOD3(SetBweBitrates, | 50 MOCK_METHOD3(SetBweBitrates, |
48 void(int min_bitrate_bps, | 51 void(int min_bitrate_bps, |
49 int start_bitrate_bps, | 52 int start_bitrate_bps, |
50 int max_bitrate_bps)); | 53 int max_bitrate_bps)); |
51 MOCK_METHOD1(SignalNetworkState, void(NetworkState state)); | 54 MOCK_METHOD1(SignalNetworkState, void(NetworkState state)); |
52 MOCK_CONST_METHOD0(GetBitrateController, BitrateController*()); | 55 MOCK_CONST_METHOD0(GetBitrateController, BitrateController*()); |
53 MOCK_METHOD1(GetRemoteBitrateEstimator, | 56 MOCK_METHOD1(GetRemoteBitrateEstimator, |
54 RemoteBitrateEstimator*(bool send_side_bwe)); | 57 RemoteBitrateEstimator*(bool send_side_bwe)); |
55 MOCK_CONST_METHOD0(GetPacerQueuingDelayMs, int64_t()); | 58 MOCK_CONST_METHOD0(GetPacerQueuingDelayMs, int64_t()); |
56 MOCK_METHOD0(pacer, PacedSender*()); | 59 MOCK_METHOD0(pacer, PacedSender*()); |
57 MOCK_METHOD0(GetTransportFeedbackObserver, TransportFeedbackObserver*()); | 60 MOCK_METHOD0(GetTransportFeedbackObserver, TransportFeedbackObserver*()); |
58 MOCK_METHOD3(UpdatePacerBitrate, | 61 MOCK_METHOD3(UpdatePacerBitrate, |
59 void(int bitrate_kbps, | 62 void(int bitrate_kbps, |
60 int max_bitrate_kbps, | 63 int max_bitrate_kbps, |
61 int min_bitrate_kbps)); | 64 int min_bitrate_kbps)); |
62 MOCK_METHOD1(OnSentPacket, void(const rtc::SentPacket& sent_packet)); | 65 MOCK_METHOD1(OnSentPacket, void(const rtc::SentPacket& sent_packet)); |
63 | 66 |
64 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(MockCongestionController); | 67 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(MockCongestionController); |
65 }; | 68 }; |
66 } // namespace test | 69 } // namespace test |
67 } // namespace webrtc | 70 } // namespace webrtc |
68 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_MOCK_MOCK_CONGESTION_CON
TROLLER_H_ | 71 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_MOCK_MOCK_CONGESTION_CON
TROLLER_H_ |
OLD | NEW |