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

Side by Side Diff: webrtc/api/statscollector_unittest.cc

Issue 1975453002: Add PeerConnection IsClosed check. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Make it an unique_ptr when passing the TransportController to WebRtcSession. Created 4 years, 6 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/api/peerconnectioninterface_unittest.cc ('k') | webrtc/api/webrtcsession.h » ('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 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2014 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 const char kRemoteTrackId[] = "remote_track_id"; 65 const char kRemoteTrackId[] = "remote_track_id";
66 const uint32_t kSsrcOfTrack = 1234; 66 const uint32_t kSsrcOfTrack = 1234;
67 67
68 class MockWebRtcSession : public webrtc::WebRtcSession { 68 class MockWebRtcSession : public webrtc::WebRtcSession {
69 public: 69 public:
70 // TODO(nisse): Valid overrides commented out, because the gmock 70 // TODO(nisse): Valid overrides commented out, because the gmock
71 // methods don't use any override declarations, and we want to avoid 71 // methods don't use any override declarations, and we want to avoid
72 // warnings from -Winconsistent-missing-override. See 72 // warnings from -Winconsistent-missing-override. See
73 // http://crbug.com/428099. 73 // http://crbug.com/428099.
74 explicit MockWebRtcSession(webrtc::MediaControllerInterface* media_controller) 74 explicit MockWebRtcSession(webrtc::MediaControllerInterface* media_controller)
75 : WebRtcSession(media_controller, 75 : WebRtcSession(
76 rtc::Thread::Current(), 76 media_controller,
77 rtc::Thread::Current(), 77 rtc::Thread::Current(),
78 rtc::Thread::Current(), 78 rtc::Thread::Current(),
79 nullptr) {} 79 rtc::Thread::Current(),
80 nullptr,
81 std::unique_ptr<cricket::TransportController>(
82 new cricket::TransportController(rtc::Thread::Current(),
83 rtc::Thread::Current(),
84 nullptr))) {}
80 MOCK_METHOD0(voice_channel, cricket::VoiceChannel*()); 85 MOCK_METHOD0(voice_channel, cricket::VoiceChannel*());
81 MOCK_METHOD0(video_channel, cricket::VideoChannel*()); 86 MOCK_METHOD0(video_channel, cricket::VideoChannel*());
82 // Libjingle uses "local" for a outgoing track, and "remote" for a incoming 87 // Libjingle uses "local" for a outgoing track, and "remote" for a incoming
83 // track. 88 // track.
84 MOCK_METHOD2(GetLocalTrackIdBySsrc, bool(uint32_t, std::string*)); 89 MOCK_METHOD2(GetLocalTrackIdBySsrc, bool(uint32_t, std::string*));
85 MOCK_METHOD2(GetRemoteTrackIdBySsrc, bool(uint32_t, std::string*)); 90 MOCK_METHOD2(GetRemoteTrackIdBySsrc, bool(uint32_t, std::string*));
86 MOCK_METHOD1(GetTransportStats, bool(SessionStats*)); 91 MOCK_METHOD1(GetTransportStats, bool(SessionStats*));
87 MOCK_METHOD2(GetLocalCertificate, 92 MOCK_METHOD2(GetLocalCertificate,
88 bool(const std::string& transport_name, 93 bool(const std::string& transport_name,
89 rtc::scoped_refptr<rtc::RTCCertificate>* certificate)); 94 rtc::scoped_refptr<rtc::RTCCertificate>* certificate));
(...skipping 1848 matching lines...) Expand 10 before | Expand all | Expand 10 after
1938 cricket::VoiceSenderInfo new_voice_sender_info; 1943 cricket::VoiceSenderInfo new_voice_sender_info;
1939 InitVoiceSenderInfo(&new_voice_sender_info); 1944 InitVoiceSenderInfo(&new_voice_sender_info);
1940 cricket::VoiceMediaInfo new_stats_read; 1945 cricket::VoiceMediaInfo new_stats_read;
1941 reports.clear(); 1946 reports.clear();
1942 SetupAndVerifyAudioTrackStats( 1947 SetupAndVerifyAudioTrackStats(
1943 new_audio_track.get(), stream_.get(), &stats, &voice_channel, kVcName, 1948 new_audio_track.get(), stream_.get(), &stats, &voice_channel, kVcName,
1944 media_channel, &new_voice_sender_info, NULL, &new_stats_read, &reports); 1949 media_channel, &new_voice_sender_info, NULL, &new_stats_read, &reports);
1945 } 1950 }
1946 1951
1947 } // namespace webrtc 1952 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/peerconnectioninterface_unittest.cc ('k') | webrtc/api/webrtcsession.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698