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

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: Change the webrtcsession constructor. 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
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(media_controller,
76 rtc::Thread::Current(), 76 rtc::Thread::Current(),
77 rtc::Thread::Current(), 77 rtc::Thread::Current(),
78 rtc::Thread::Current(), 78 rtc::Thread::Current(),
79 nullptr) {} 79 nullptr,
80 new cricket::TransportController(rtc::Thread::Current(),
81 rtc::Thread::Current(),
82 nullptr)) {}
80 MOCK_METHOD0(voice_channel, cricket::VoiceChannel*()); 83 MOCK_METHOD0(voice_channel, cricket::VoiceChannel*());
81 MOCK_METHOD0(video_channel, cricket::VideoChannel*()); 84 MOCK_METHOD0(video_channel, cricket::VideoChannel*());
82 // Libjingle uses "local" for a outgoing track, and "remote" for a incoming 85 // Libjingle uses "local" for a outgoing track, and "remote" for a incoming
83 // track. 86 // track.
84 MOCK_METHOD2(GetLocalTrackIdBySsrc, bool(uint32_t, std::string*)); 87 MOCK_METHOD2(GetLocalTrackIdBySsrc, bool(uint32_t, std::string*));
85 MOCK_METHOD2(GetRemoteTrackIdBySsrc, bool(uint32_t, std::string*)); 88 MOCK_METHOD2(GetRemoteTrackIdBySsrc, bool(uint32_t, std::string*));
86 MOCK_METHOD1(GetTransportStats, bool(SessionStats*)); 89 MOCK_METHOD1(GetTransportStats, bool(SessionStats*));
87 MOCK_METHOD2(GetLocalCertificate, 90 MOCK_METHOD2(GetLocalCertificate,
88 bool(const std::string& transport_name, 91 bool(const std::string& transport_name,
89 rtc::scoped_refptr<rtc::RTCCertificate>* certificate)); 92 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; 1941 cricket::VoiceSenderInfo new_voice_sender_info;
1939 InitVoiceSenderInfo(&new_voice_sender_info); 1942 InitVoiceSenderInfo(&new_voice_sender_info);
1940 cricket::VoiceMediaInfo new_stats_read; 1943 cricket::VoiceMediaInfo new_stats_read;
1941 reports.clear(); 1944 reports.clear();
1942 SetupAndVerifyAudioTrackStats( 1945 SetupAndVerifyAudioTrackStats(
1943 new_audio_track.get(), stream_.get(), &stats, &voice_channel, kVcName, 1946 new_audio_track.get(), stream_.get(), &stats, &voice_channel, kVcName,
1944 media_channel, &new_voice_sender_info, NULL, &new_stats_read, &reports); 1947 media_channel, &new_voice_sender_info, NULL, &new_stats_read, &reports);
1945 } 1948 }
1946 1949
1947 } // namespace webrtc 1950 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698