OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 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 |
(...skipping 14 matching lines...) Expand all Loading... |
25 class FakePeerConnectionFactory | 25 class FakePeerConnectionFactory |
26 : public rtc::RefCountedObject<webrtc::PeerConnectionFactory> { | 26 : public rtc::RefCountedObject<webrtc::PeerConnectionFactory> { |
27 public: | 27 public: |
28 FakePeerConnectionFactory() | 28 FakePeerConnectionFactory() |
29 : rtc::RefCountedObject<webrtc::PeerConnectionFactory>( | 29 : rtc::RefCountedObject<webrtc::PeerConnectionFactory>( |
30 rtc::Thread::Current(), | 30 rtc::Thread::Current(), |
31 rtc::Thread::Current(), | 31 rtc::Thread::Current(), |
32 rtc::Thread::Current(), | 32 rtc::Thread::Current(), |
33 nullptr, | 33 nullptr, |
34 nullptr, | 34 nullptr, |
35 nullptr, | |
36 nullptr, | |
37 nullptr, | |
38 nullptr, | |
39 std::unique_ptr<cricket::MediaEngineInterface>(), | 35 std::unique_ptr<cricket::MediaEngineInterface>(), |
40 std::unique_ptr<webrtc::CallFactoryInterface>(), | 36 std::unique_ptr<webrtc::CallFactoryInterface>(), |
41 std::unique_ptr<RtcEventLogFactoryInterface>()) {} | 37 std::unique_ptr<RtcEventLogFactoryInterface>()) {} |
42 }; | 38 }; |
43 | 39 |
44 class MockPeerConnection | 40 class MockPeerConnection |
45 : public rtc::RefCountedObject<webrtc::PeerConnection> { | 41 : public rtc::RefCountedObject<webrtc::PeerConnection> { |
46 public: | 42 public: |
47 MockPeerConnection() | 43 MockPeerConnection() |
48 : rtc::RefCountedObject<webrtc::PeerConnection>( | 44 : rtc::RefCountedObject<webrtc::PeerConnection>( |
49 new FakePeerConnectionFactory(), | 45 new FakePeerConnectionFactory(), |
50 std::unique_ptr<RtcEventLog>(), | 46 std::unique_ptr<RtcEventLog>(), |
51 std::unique_ptr<Call>()) {} | 47 std::unique_ptr<Call>()) {} |
52 MOCK_METHOD0(local_streams, | 48 MOCK_METHOD0(local_streams, |
53 rtc::scoped_refptr<StreamCollectionInterface>()); | 49 rtc::scoped_refptr<StreamCollectionInterface>()); |
54 MOCK_METHOD0(remote_streams, | 50 MOCK_METHOD0(remote_streams, |
55 rtc::scoped_refptr<StreamCollectionInterface>()); | 51 rtc::scoped_refptr<StreamCollectionInterface>()); |
56 MOCK_METHOD0(session, WebRtcSession*()); | 52 MOCK_METHOD0(session, WebRtcSession*()); |
57 MOCK_CONST_METHOD0(GetSenders, | 53 MOCK_CONST_METHOD0(GetSenders, |
58 std::vector<rtc::scoped_refptr<RtpSenderInterface>>()); | 54 std::vector<rtc::scoped_refptr<RtpSenderInterface>>()); |
59 MOCK_CONST_METHOD0(GetReceivers, | 55 MOCK_CONST_METHOD0(GetReceivers, |
60 std::vector<rtc::scoped_refptr<RtpReceiverInterface>>()); | 56 std::vector<rtc::scoped_refptr<RtpReceiverInterface>>()); |
61 MOCK_CONST_METHOD0(sctp_data_channels, | 57 MOCK_CONST_METHOD0(sctp_data_channels, |
62 const std::vector<rtc::scoped_refptr<DataChannel>>&()); | 58 const std::vector<rtc::scoped_refptr<DataChannel>>&()); |
63 }; | 59 }; |
64 | 60 |
65 } // namespace webrtc | 61 } // namespace webrtc |
66 | 62 |
67 #endif // PC_TEST_MOCK_PEERCONNECTION_H_ | 63 #endif // PC_TEST_MOCK_PEERCONNECTION_H_ |
OLD | NEW |