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

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

Issue 1670153003: Introduce struct MediaConfig, with construction-time settings. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed test nit; use reference. Created 4 years, 10 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.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 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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 double time_now_; 482 double time_now_;
483 }; 483 };
484 484
485 class StatsCollectorTest : public testing::Test { 485 class StatsCollectorTest : public testing::Test {
486 protected: 486 protected:
487 StatsCollectorTest() 487 StatsCollectorTest()
488 : media_engine_(new cricket::FakeMediaEngine()), 488 : media_engine_(new cricket::FakeMediaEngine()),
489 channel_manager_( 489 channel_manager_(
490 new cricket::ChannelManager(media_engine_, rtc::Thread::Current())), 490 new cricket::ChannelManager(media_engine_, rtc::Thread::Current())),
491 media_controller_( 491 media_controller_(
492 webrtc::MediaControllerInterface::Create(rtc::Thread::Current(), 492 webrtc::MediaControllerInterface::Create(cricket::MediaConfig(),
493 rtc::Thread::Current(),
493 channel_manager_.get())), 494 channel_manager_.get())),
494 session_(media_controller_.get()) { 495 session_(media_controller_.get()) {
495 // By default, we ignore session GetStats calls. 496 // By default, we ignore session GetStats calls.
496 EXPECT_CALL(session_, GetTransportStats(_)).WillRepeatedly(Return(false)); 497 EXPECT_CALL(session_, GetTransportStats(_)).WillRepeatedly(Return(false));
497 // Add default returns for mock classes. 498 // Add default returns for mock classes.
498 EXPECT_CALL(session_, video_channel()).WillRepeatedly(ReturnNull()); 499 EXPECT_CALL(session_, video_channel()).WillRepeatedly(ReturnNull());
499 EXPECT_CALL(session_, voice_channel()).WillRepeatedly(ReturnNull()); 500 EXPECT_CALL(session_, voice_channel()).WillRepeatedly(ReturnNull());
500 EXPECT_CALL(pc_, session()).WillRepeatedly(Return(&session_)); 501 EXPECT_CALL(pc_, session()).WillRepeatedly(Return(&session_));
501 EXPECT_CALL(pc_, sctp_data_channels()) 502 EXPECT_CALL(pc_, sctp_data_channels())
502 .WillRepeatedly(ReturnRef(data_channels_)); 503 .WillRepeatedly(ReturnRef(data_channels_));
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1730 cricket::VoiceSenderInfo new_voice_sender_info; 1731 cricket::VoiceSenderInfo new_voice_sender_info;
1731 InitVoiceSenderInfo(&new_voice_sender_info); 1732 InitVoiceSenderInfo(&new_voice_sender_info);
1732 cricket::VoiceMediaInfo new_stats_read; 1733 cricket::VoiceMediaInfo new_stats_read;
1733 reports.clear(); 1734 reports.clear();
1734 SetupAndVerifyAudioTrackStats( 1735 SetupAndVerifyAudioTrackStats(
1735 new_audio_track.get(), stream_.get(), &stats, &voice_channel, kVcName, 1736 new_audio_track.get(), stream_.get(), &stats, &voice_channel, kVcName,
1736 media_channel, &new_voice_sender_info, NULL, &new_stats_read, &reports); 1737 media_channel, &new_voice_sender_info, NULL, &new_stats_read, &reports);
1737 } 1738 }
1738 1739
1739 } // namespace webrtc 1740 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/peerconnectioninterface_unittest.cc ('k') | webrtc/api/webrtcsession.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698