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

Side by Side Diff: webrtc/pc/test/mock_webrtcsession.h

Issue 2815513012: Negotiate the same SRTP crypto suites for every DTLS association formed. (Closed)
Patch Set: Merge with master Created 3 years, 8 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
« no previous file with comments | « webrtc/pc/peerconnectioninterface_unittest.cc ('k') | webrtc/pc/webrtcsession_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 16 matching lines...) Expand all
27 // warnings from -Winconsistent-missing-override. See 27 // warnings from -Winconsistent-missing-override. See
28 // http://crbug.com/428099. 28 // http://crbug.com/428099.
29 explicit MockWebRtcSession(MediaControllerInterface* media_controller) 29 explicit MockWebRtcSession(MediaControllerInterface* media_controller)
30 : WebRtcSession( 30 : WebRtcSession(
31 media_controller, 31 media_controller,
32 rtc::Thread::Current(), 32 rtc::Thread::Current(),
33 rtc::Thread::Current(), 33 rtc::Thread::Current(),
34 rtc::Thread::Current(), 34 rtc::Thread::Current(),
35 nullptr, 35 nullptr,
36 std::unique_ptr<cricket::TransportController>( 36 std::unique_ptr<cricket::TransportController>(
37 new cricket::TransportController(rtc::Thread::Current(), 37 new cricket::TransportController(
38 rtc::Thread::Current(), 38 rtc::Thread::Current(),
39 nullptr)), 39 rtc::Thread::Current(),
40 nullptr,
41 /*redetermine_role_on_ice_restart=*/true,
42 rtc::CryptoOptions())),
40 std::unique_ptr<cricket::SctpTransportInternalFactory>()) {} 43 std::unique_ptr<cricket::SctpTransportInternalFactory>()) {}
41 MOCK_METHOD0(voice_channel, cricket::VoiceChannel*()); 44 MOCK_METHOD0(voice_channel, cricket::VoiceChannel*());
42 MOCK_METHOD0(video_channel, cricket::VideoChannel*()); 45 MOCK_METHOD0(video_channel, cricket::VideoChannel*());
43 // Libjingle uses "local" for a outgoing track, and "remote" for a incoming 46 // Libjingle uses "local" for a outgoing track, and "remote" for a incoming
44 // track. 47 // track.
45 MOCK_METHOD2(GetLocalTrackIdBySsrc, bool(uint32_t, std::string*)); 48 MOCK_METHOD2(GetLocalTrackIdBySsrc, bool(uint32_t, std::string*));
46 MOCK_METHOD2(GetRemoteTrackIdBySsrc, bool(uint32_t, std::string*)); 49 MOCK_METHOD2(GetRemoteTrackIdBySsrc, bool(uint32_t, std::string*));
47 MOCK_METHOD1(GetStats, 50 MOCK_METHOD1(GetStats,
48 std::unique_ptr<SessionStats>(const ChannelNamePairs&)); 51 std::unique_ptr<SessionStats>(const ChannelNamePairs&));
49 MOCK_METHOD2(GetLocalCertificate, 52 MOCK_METHOD2(GetLocalCertificate,
50 bool(const std::string& transport_name, 53 bool(const std::string& transport_name,
51 rtc::scoped_refptr<rtc::RTCCertificate>* certificate)); 54 rtc::scoped_refptr<rtc::RTCCertificate>* certificate));
52 55
53 // Workaround for gmock's inability to cope with move-only return values. 56 // Workaround for gmock's inability to cope with move-only return values.
54 std::unique_ptr<rtc::SSLCertificate> GetRemoteSSLCertificate( 57 std::unique_ptr<rtc::SSLCertificate> GetRemoteSSLCertificate(
55 const std::string& transport_name) /* override */ { 58 const std::string& transport_name) /* override */ {
56 return std::unique_ptr<rtc::SSLCertificate>( 59 return std::unique_ptr<rtc::SSLCertificate>(
57 GetRemoteSSLCertificate_ReturnsRawPointer(transport_name)); 60 GetRemoteSSLCertificate_ReturnsRawPointer(transport_name));
58 } 61 }
59 MOCK_METHOD1(GetRemoteSSLCertificate_ReturnsRawPointer, 62 MOCK_METHOD1(GetRemoteSSLCertificate_ReturnsRawPointer,
60 rtc::SSLCertificate*(const std::string& transport_name)); 63 rtc::SSLCertificate*(const std::string& transport_name));
61 }; 64 };
62 65
63 } // namespace webrtc 66 } // namespace webrtc
64 67
65 #endif // WEBRTC_PC_TEST_MOCK_WEBRTCSESSION_H_ 68 #endif // WEBRTC_PC_TEST_MOCK_WEBRTCSESSION_H_
OLDNEW
« no previous file with comments | « webrtc/pc/peerconnectioninterface_unittest.cc ('k') | webrtc/pc/webrtcsession_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698