OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "webrtc/test/gmock.h" | 24 #include "webrtc/test/gmock.h" |
25 | 25 |
26 namespace webrtc { | 26 namespace webrtc { |
27 | 27 |
28 class MockRtpData : public RtpData { | 28 class MockRtpData : public RtpData { |
29 public: | 29 public: |
30 MOCK_METHOD3(OnReceivedPayloadData, | 30 MOCK_METHOD3(OnReceivedPayloadData, |
31 int32_t(const uint8_t* payload_data, | 31 int32_t(const uint8_t* payload_data, |
32 size_t payload_size, | 32 size_t payload_size, |
33 const WebRtcRTPHeader* rtp_header)); | 33 const WebRtcRTPHeader* rtp_header)); |
34 | |
35 MOCK_METHOD2(OnRecoveredPacket, | |
36 bool(const uint8_t* packet, size_t packet_length)); | |
37 }; | 34 }; |
38 | 35 |
39 class MockRtpRtcp : public RtpRtcp { | 36 class MockRtpRtcp : public RtpRtcp { |
40 public: | 37 public: |
41 MOCK_METHOD1(RegisterDefaultModule, int32_t(RtpRtcp* module)); | 38 MOCK_METHOD1(RegisterDefaultModule, int32_t(RtpRtcp* module)); |
42 MOCK_METHOD0(DeRegisterDefaultModule, int32_t()); | 39 MOCK_METHOD0(DeRegisterDefaultModule, int32_t()); |
43 MOCK_METHOD0(DefaultModuleRegistered, bool()); | 40 MOCK_METHOD0(DefaultModuleRegistered, bool()); |
44 MOCK_METHOD0(NumberChildModules, uint32_t()); | 41 MOCK_METHOD0(NumberChildModules, uint32_t()); |
45 MOCK_METHOD1(RegisterSyncModule, int32_t(RtpRtcp* module)); | 42 MOCK_METHOD1(RegisterSyncModule, int32_t(RtpRtcp* module)); |
46 MOCK_METHOD0(DeRegisterSyncModule, int32_t()); | 43 MOCK_METHOD0(DeRegisterSyncModule, int32_t()); |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 private: | 205 private: |
209 // Mocking this method is currently not required and having a default | 206 // Mocking this method is currently not required and having a default |
210 // implementation like MOCK_METHOD0(TimeUntilNextProcess, int64_t()) | 207 // implementation like MOCK_METHOD0(TimeUntilNextProcess, int64_t()) |
211 // can be dangerous since it can cause a tight loop on a process thread. | 208 // can be dangerous since it can cause a tight loop on a process thread. |
212 virtual int64_t TimeUntilNextProcess() { return 0xffffffff; } | 209 virtual int64_t TimeUntilNextProcess() { return 0xffffffff; } |
213 }; | 210 }; |
214 | 211 |
215 } // namespace webrtc | 212 } // namespace webrtc |
216 | 213 |
217 #endif // WEBRTC_MODULES_RTP_RTCP_MOCKS_MOCK_RTP_RTCP_H_ | 214 #endif // WEBRTC_MODULES_RTP_RTCP_MOCKS_MOCK_RTP_RTCP_H_ |
OLD | NEW |