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 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 &event_log_)), | 515 &event_log_)), |
516 session_(media_controller_.get()) { | 516 session_(media_controller_.get()) { |
517 // By default, we ignore session GetStats calls. | 517 // By default, we ignore session GetStats calls. |
518 EXPECT_CALL(session_, GetStats(_)).WillRepeatedly(ReturnNull()); | 518 EXPECT_CALL(session_, GetStats(_)).WillRepeatedly(ReturnNull()); |
519 // Add default returns for mock classes. | 519 // Add default returns for mock classes. |
520 EXPECT_CALL(session_, video_channel()).WillRepeatedly(ReturnNull()); | 520 EXPECT_CALL(session_, video_channel()).WillRepeatedly(ReturnNull()); |
521 EXPECT_CALL(session_, voice_channel()).WillRepeatedly(ReturnNull()); | 521 EXPECT_CALL(session_, voice_channel()).WillRepeatedly(ReturnNull()); |
522 EXPECT_CALL(pc_, session()).WillRepeatedly(Return(&session_)); | 522 EXPECT_CALL(pc_, session()).WillRepeatedly(Return(&session_)); |
523 EXPECT_CALL(pc_, sctp_data_channels()) | 523 EXPECT_CALL(pc_, sctp_data_channels()) |
524 .WillRepeatedly(ReturnRef(data_channels_)); | 524 .WillRepeatedly(ReturnRef(data_channels_)); |
| 525 EXPECT_CALL(pc_, GetSenders()).WillRepeatedly(Return( |
| 526 std::vector<rtc::scoped_refptr<RtpSenderInterface>>())); |
| 527 EXPECT_CALL(pc_, GetReceivers()).WillRepeatedly(Return( |
| 528 std::vector<rtc::scoped_refptr<RtpReceiverInterface>>())); |
525 } | 529 } |
526 | 530 |
527 ~StatsCollectorTest() {} | 531 ~StatsCollectorTest() {} |
528 | 532 |
529 // This creates a standard setup with a transport called "trspname" | 533 // This creates a standard setup with a transport called "trspname" |
530 // having one transport channel | 534 // having one transport channel |
531 // and the specified virtual connection name. | 535 // and the specified virtual connection name. |
532 void InitSessionStats(const std::string& vc_name) { | 536 void InitSessionStats(const std::string& vc_name) { |
533 const std::string kTransportName("trspname"); | 537 const std::string kTransportName("trspname"); |
534 cricket::TransportStats transport_stats; | 538 cricket::TransportStats transport_stats; |
(...skipping 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2022 EXPECT_CALL(*media_channel, GetStats(_)) | 2026 EXPECT_CALL(*media_channel, GetStats(_)) |
2023 .WillOnce(DoAll(SetArgPointee<0>(stats_read), Return(true))); | 2027 .WillOnce(DoAll(SetArgPointee<0>(stats_read), Return(true))); |
2024 stats.UpdateStats(PeerConnectionInterface::kStatsOutputLevelStandard); | 2028 stats.UpdateStats(PeerConnectionInterface::kStatsOutputLevelStandard); |
2025 stats.GetStats(NULL, &reports); | 2029 stats.GetStats(NULL, &reports); |
2026 EXPECT_EQ(rtc::ToString(video_receiver_info.frames_decoded), | 2030 EXPECT_EQ(rtc::ToString(video_receiver_info.frames_decoded), |
2027 ExtractSsrcStatsValue(reports, | 2031 ExtractSsrcStatsValue(reports, |
2028 StatsReport::kStatsValueNameFramesDecoded)); | 2032 StatsReport::kStatsValueNameFramesDecoded)); |
2029 } | 2033 } |
2030 | 2034 |
2031 } // namespace webrtc | 2035 } // namespace webrtc |
OLD | NEW |