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 1459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1470 channel_stats.component = 1; | 1470 channel_stats.component = 1; |
1471 | 1471 |
1472 cricket::TransportStats transport_stats; | 1472 cricket::TransportStats transport_stats; |
1473 transport_stats.transport_name = "audio"; | 1473 transport_stats.transport_name = "audio"; |
1474 transport_stats.channel_stats.push_back(channel_stats); | 1474 transport_stats.channel_stats.push_back(channel_stats); |
1475 | 1475 |
1476 SessionStats session_stats; | 1476 SessionStats session_stats; |
1477 session_stats.transport_stats[transport_stats.transport_name] = | 1477 session_stats.transport_stats[transport_stats.transport_name] = |
1478 transport_stats; | 1478 transport_stats; |
1479 | 1479 |
1480 // Fake transport object. | |
1481 std::unique_ptr<cricket::FakeTransport> transport( | |
1482 new cricket::FakeTransport(transport_stats.transport_name)); | |
1483 | |
1484 // Configure MockWebRtcSession | 1480 // Configure MockWebRtcSession |
1485 EXPECT_CALL(session_, GetTransportStats(_)) | 1481 EXPECT_CALL(session_, GetTransportStats(_)) |
1486 .WillOnce(DoAll(SetArgPointee<0>(session_stats), | 1482 .WillOnce(DoAll(SetArgPointee<0>(session_stats), |
1487 Return(true))); | 1483 Return(true))); |
1488 stats.UpdateStats(PeerConnectionInterface::kStatsOutputLevelStandard); | 1484 stats.UpdateStats(PeerConnectionInterface::kStatsOutputLevelStandard); |
1489 stats.GetStats(NULL, &reports); | 1485 stats.GetStats(NULL, &reports); |
1490 | 1486 |
1491 // Check that the local certificate is absent. | 1487 // Check that the local certificate is absent. |
1492 std::string local_certificate_id = ExtractStatsValue( | 1488 std::string local_certificate_id = ExtractStatsValue( |
1493 StatsReport::kStatsReportTypeComponent, | 1489 StatsReport::kStatsReportTypeComponent, |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1978 EXPECT_CALL(*media_channel, GetStats(_)) | 1974 EXPECT_CALL(*media_channel, GetStats(_)) |
1979 .WillOnce(DoAll(SetArgPointee<0>(stats_read), Return(true))); | 1975 .WillOnce(DoAll(SetArgPointee<0>(stats_read), Return(true))); |
1980 stats.UpdateStats(PeerConnectionInterface::kStatsOutputLevelStandard); | 1976 stats.UpdateStats(PeerConnectionInterface::kStatsOutputLevelStandard); |
1981 stats.GetStats(NULL, &reports); | 1977 stats.GetStats(NULL, &reports); |
1982 EXPECT_EQ(rtc::ToString(video_receiver_info.frames_decoded), | 1978 EXPECT_EQ(rtc::ToString(video_receiver_info.frames_decoded), |
1983 ExtractSsrcStatsValue(reports, | 1979 ExtractSsrcStatsValue(reports, |
1984 StatsReport::kStatsValueNameFramesDecoded)); | 1980 StatsReport::kStatsValueNameFramesDecoded)); |
1985 } | 1981 } |
1986 | 1982 |
1987 } // namespace webrtc | 1983 } // namespace webrtc |
OLD | NEW |