OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 double time_now_; | 499 double time_now_; |
500 }; | 500 }; |
501 | 501 |
502 class StatsCollectorTest : public testing::Test { | 502 class StatsCollectorTest : public testing::Test { |
503 protected: | 503 protected: |
504 StatsCollectorTest() | 504 StatsCollectorTest() |
505 : media_engine_(new cricket::FakeMediaEngine()), | 505 : media_engine_(new cricket::FakeMediaEngine()), |
506 channel_manager_( | 506 channel_manager_( |
507 new cricket::ChannelManager(media_engine_, rtc::Thread::Current())), | 507 new cricket::ChannelManager(media_engine_, rtc::Thread::Current())), |
508 media_controller_( | 508 media_controller_( |
509 webrtc::MediaControllerInterface::Create(rtc::Thread::Current(), | 509 webrtc::MediaControllerInterface::Create(cricket::MediaConfig(), |
| 510 rtc::Thread::Current(), |
510 channel_manager_.get())), | 511 channel_manager_.get())), |
511 session_(media_controller_.get()) { | 512 session_(media_controller_.get()) { |
512 // By default, we ignore session GetStats calls. | 513 // By default, we ignore session GetStats calls. |
513 EXPECT_CALL(session_, GetTransportStats(_)).WillRepeatedly(Return(false)); | 514 EXPECT_CALL(session_, GetTransportStats(_)).WillRepeatedly(Return(false)); |
514 // Add default returns for mock classes. | 515 // Add default returns for mock classes. |
515 EXPECT_CALL(session_, video_channel()).WillRepeatedly(ReturnNull()); | 516 EXPECT_CALL(session_, video_channel()).WillRepeatedly(ReturnNull()); |
516 EXPECT_CALL(session_, voice_channel()).WillRepeatedly(ReturnNull()); | 517 EXPECT_CALL(session_, voice_channel()).WillRepeatedly(ReturnNull()); |
517 EXPECT_CALL(pc_, session()).WillRepeatedly(Return(&session_)); | 518 EXPECT_CALL(pc_, session()).WillRepeatedly(Return(&session_)); |
518 EXPECT_CALL(pc_, sctp_data_channels()) | 519 EXPECT_CALL(pc_, sctp_data_channels()) |
519 .WillRepeatedly(ReturnRef(data_channels_)); | 520 .WillRepeatedly(ReturnRef(data_channels_)); |
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1747 cricket::VoiceSenderInfo new_voice_sender_info; | 1748 cricket::VoiceSenderInfo new_voice_sender_info; |
1748 InitVoiceSenderInfo(&new_voice_sender_info); | 1749 InitVoiceSenderInfo(&new_voice_sender_info); |
1749 cricket::VoiceMediaInfo new_stats_read; | 1750 cricket::VoiceMediaInfo new_stats_read; |
1750 reports.clear(); | 1751 reports.clear(); |
1751 SetupAndVerifyAudioTrackStats( | 1752 SetupAndVerifyAudioTrackStats( |
1752 new_audio_track.get(), stream_.get(), &stats, &voice_channel, kVcName, | 1753 new_audio_track.get(), stream_.get(), &stats, &voice_channel, kVcName, |
1753 media_channel, &new_voice_sender_info, NULL, &new_stats_read, &reports); | 1754 media_channel, &new_voice_sender_info, NULL, &new_stats_read, &reports); |
1754 } | 1755 } |
1755 | 1756 |
1756 } // namespace webrtc | 1757 } // namespace webrtc |
OLD | NEW |