| OLD | NEW |
| 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 17 matching lines...) Expand all Loading... |
| 28 #include "webrtc/api/test/mock_webrtcsession.h" | 28 #include "webrtc/api/test/mock_webrtcsession.h" |
| 29 #include "webrtc/api/videotrack.h" | 29 #include "webrtc/api/videotrack.h" |
| 30 #include "webrtc/base/base64.h" | 30 #include "webrtc/base/base64.h" |
| 31 #include "webrtc/base/fakesslidentity.h" | 31 #include "webrtc/base/fakesslidentity.h" |
| 32 #include "webrtc/base/gunit.h" | 32 #include "webrtc/base/gunit.h" |
| 33 #include "webrtc/base/network.h" | 33 #include "webrtc/base/network.h" |
| 34 #include "webrtc/media/base/fakemediaengine.h" | 34 #include "webrtc/media/base/fakemediaengine.h" |
| 35 #include "webrtc/media/base/test/mock_mediachannel.h" | 35 #include "webrtc/media/base/test/mock_mediachannel.h" |
| 36 #include "webrtc/p2p/base/faketransportcontroller.h" | 36 #include "webrtc/p2p/base/faketransportcontroller.h" |
| 37 #include "webrtc/pc/channelmanager.h" | 37 #include "webrtc/pc/channelmanager.h" |
| 38 #include "webrtc/system_wrappers/include/clock.h" |
| 38 | 39 |
| 39 using testing::_; | 40 using testing::_; |
| 40 using testing::DoAll; | 41 using testing::DoAll; |
| 41 using testing::Field; | 42 using testing::Field; |
| 42 using testing::Return; | 43 using testing::Return; |
| 43 using testing::ReturnNull; | 44 using testing::ReturnNull; |
| 44 using testing::ReturnRef; | 45 using testing::ReturnRef; |
| 45 using testing::SetArgPointee; | 46 using testing::SetArgPointee; |
| 46 using webrtc::PeerConnectionInterface; | 47 using webrtc::PeerConnectionInterface; |
| 47 using webrtc::StatsReport; | 48 using webrtc::StatsReport; |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 StatsCollectorTest() | 487 StatsCollectorTest() |
| 487 : worker_thread_(rtc::Thread::Current()), | 488 : worker_thread_(rtc::Thread::Current()), |
| 488 network_thread_(rtc::Thread::Current()), | 489 network_thread_(rtc::Thread::Current()), |
| 489 media_engine_(new cricket::FakeMediaEngine()), | 490 media_engine_(new cricket::FakeMediaEngine()), |
| 490 channel_manager_(new cricket::ChannelManager(media_engine_, | 491 channel_manager_(new cricket::ChannelManager(media_engine_, |
| 491 worker_thread_, | 492 worker_thread_, |
| 492 network_thread_)), | 493 network_thread_)), |
| 493 media_controller_( | 494 media_controller_( |
| 494 webrtc::MediaControllerInterface::Create(cricket::MediaConfig(), | 495 webrtc::MediaControllerInterface::Create(cricket::MediaConfig(), |
| 495 worker_thread_, | 496 worker_thread_, |
| 496 channel_manager_.get())), | 497 channel_manager_.get(), |
| 498 nullptr /* event_log */)), |
| 497 session_(media_controller_.get()) { | 499 session_(media_controller_.get()) { |
| 498 // By default, we ignore session GetStats calls. | 500 // By default, we ignore session GetStats calls. |
| 499 EXPECT_CALL(session_, GetTransportStats(_)).WillRepeatedly(Return(false)); | 501 EXPECT_CALL(session_, GetTransportStats(_)).WillRepeatedly(Return(false)); |
| 500 // Add default returns for mock classes. | 502 // Add default returns for mock classes. |
| 501 EXPECT_CALL(session_, video_channel()).WillRepeatedly(ReturnNull()); | 503 EXPECT_CALL(session_, video_channel()).WillRepeatedly(ReturnNull()); |
| 502 EXPECT_CALL(session_, voice_channel()).WillRepeatedly(ReturnNull()); | 504 EXPECT_CALL(session_, voice_channel()).WillRepeatedly(ReturnNull()); |
| 503 EXPECT_CALL(pc_, session()).WillRepeatedly(Return(&session_)); | 505 EXPECT_CALL(pc_, session()).WillRepeatedly(Return(&session_)); |
| 504 EXPECT_CALL(pc_, sctp_data_channels()) | 506 EXPECT_CALL(pc_, sctp_data_channels()) |
| 505 .WillRepeatedly(ReturnRef(data_channels_)); | 507 .WillRepeatedly(ReturnRef(data_channels_)); |
| 506 } | 508 } |
| (...skipping 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1882 cricket::VoiceSenderInfo new_voice_sender_info; | 1884 cricket::VoiceSenderInfo new_voice_sender_info; |
| 1883 InitVoiceSenderInfo(&new_voice_sender_info); | 1885 InitVoiceSenderInfo(&new_voice_sender_info); |
| 1884 cricket::VoiceMediaInfo new_stats_read; | 1886 cricket::VoiceMediaInfo new_stats_read; |
| 1885 reports.clear(); | 1887 reports.clear(); |
| 1886 SetupAndVerifyAudioTrackStats( | 1888 SetupAndVerifyAudioTrackStats( |
| 1887 new_audio_track.get(), stream_.get(), &stats, &voice_channel, kVcName, | 1889 new_audio_track.get(), stream_.get(), &stats, &voice_channel, kVcName, |
| 1888 media_channel, &new_voice_sender_info, NULL, &new_stats_read, &reports); | 1890 media_channel, &new_voice_sender_info, NULL, &new_stats_read, &reports); |
| 1889 } | 1891 } |
| 1890 | 1892 |
| 1891 } // namespace webrtc | 1893 } // namespace webrtc |
| OLD | NEW |