| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2016 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 990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1001 cricket::ConnectionInfo connection_info; | 1001 cricket::ConnectionInfo connection_info; |
| 1002 connection_info.local_candidate = *local_candidate.get(); | 1002 connection_info.local_candidate = *local_candidate.get(); |
| 1003 connection_info.remote_candidate = *remote_candidate.get(); | 1003 connection_info.remote_candidate = *remote_candidate.get(); |
| 1004 connection_info.writable = true; | 1004 connection_info.writable = true; |
| 1005 connection_info.sent_total_bytes = 42; | 1005 connection_info.sent_total_bytes = 42; |
| 1006 connection_info.recv_total_bytes = 1234; | 1006 connection_info.recv_total_bytes = 1234; |
| 1007 connection_info.rtt = 1337; | 1007 connection_info.rtt = 1337; |
| 1008 connection_info.sent_ping_requests_total = 1010; | 1008 connection_info.sent_ping_requests_total = 1010; |
| 1009 connection_info.recv_ping_responses = 4321; | 1009 connection_info.recv_ping_responses = 4321; |
| 1010 connection_info.sent_ping_responses = 1000; | 1010 connection_info.sent_ping_responses = 1000; |
| 1011 connection_info.sent_ping_requests_before_first_response = 3030; |
| 1011 | 1012 |
| 1012 cricket::TransportChannelStats transport_channel_stats; | 1013 cricket::TransportChannelStats transport_channel_stats; |
| 1013 transport_channel_stats.component = cricket::ICE_CANDIDATE_COMPONENT_RTP; | 1014 transport_channel_stats.component = cricket::ICE_CANDIDATE_COMPONENT_RTP; |
| 1014 transport_channel_stats.connection_infos.push_back(connection_info); | 1015 transport_channel_stats.connection_infos.push_back(connection_info); |
| 1015 session_stats.transport_stats["transport"].transport_name = "transport"; | 1016 session_stats.transport_stats["transport"].transport_name = "transport"; |
| 1016 session_stats.transport_stats["transport"].channel_stats.push_back( | 1017 session_stats.transport_stats["transport"].channel_stats.push_back( |
| 1017 transport_channel_stats); | 1018 transport_channel_stats); |
| 1018 | 1019 |
| 1019 // Mock the session to return the desired candidates. | 1020 // Mock the session to return the desired candidates. |
| 1020 EXPECT_CALL(test_->session(), GetTransportStats(_)).WillRepeatedly(Invoke( | 1021 EXPECT_CALL(test_->session(), GetTransportStats(_)).WillRepeatedly(Invoke( |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1035 expected_pair.local_candidate_id = "RTCIceCandidate_" + local_candidate->id(); | 1036 expected_pair.local_candidate_id = "RTCIceCandidate_" + local_candidate->id(); |
| 1036 expected_pair.remote_candidate_id = | 1037 expected_pair.remote_candidate_id = |
| 1037 "RTCIceCandidate_" + remote_candidate->id(); | 1038 "RTCIceCandidate_" + remote_candidate->id(); |
| 1038 expected_pair.writable = true; | 1039 expected_pair.writable = true; |
| 1039 expected_pair.bytes_sent = 42; | 1040 expected_pair.bytes_sent = 42; |
| 1040 expected_pair.bytes_received = 1234; | 1041 expected_pair.bytes_received = 1234; |
| 1041 expected_pair.current_rtt = 1.337; | 1042 expected_pair.current_rtt = 1.337; |
| 1042 expected_pair.requests_sent = 1010; | 1043 expected_pair.requests_sent = 1010; |
| 1043 expected_pair.responses_received = 4321; | 1044 expected_pair.responses_received = 4321; |
| 1044 expected_pair.responses_sent = 1000; | 1045 expected_pair.responses_sent = 1000; |
| 1046 expected_pair.consent_requests_sent = 3030; |
| 1045 | 1047 |
| 1046 EXPECT_TRUE(report->Get(expected_pair.id())); | 1048 EXPECT_TRUE(report->Get(expected_pair.id())); |
| 1047 EXPECT_EQ( | 1049 EXPECT_EQ( |
| 1048 expected_pair, | 1050 expected_pair, |
| 1049 report->Get(expected_pair.id())->cast_to<RTCIceCandidatePairStats>()); | 1051 report->Get(expected_pair.id())->cast_to<RTCIceCandidatePairStats>()); |
| 1050 | 1052 |
| 1051 EXPECT_TRUE(report->Get(*expected_pair.local_candidate_id)); | 1053 EXPECT_TRUE(report->Get(*expected_pair.local_candidate_id)); |
| 1052 ExpectReportContainsCandidate(report, connection_info.local_candidate, true); | 1054 ExpectReportContainsCandidate(report, connection_info.local_candidate, true); |
| 1053 EXPECT_TRUE(report->Get(*expected_pair.remote_candidate_id)); | 1055 EXPECT_TRUE(report->Get(*expected_pair.remote_candidate_id)); |
| 1054 ExpectReportContainsCandidate(report, connection_info.remote_candidate, | 1056 ExpectReportContainsCandidate(report, connection_info.remote_candidate, |
| (...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1746 rtc::scoped_refptr<FakeRTCStatsCollector> collector_; | 1748 rtc::scoped_refptr<FakeRTCStatsCollector> collector_; |
| 1747 }; | 1749 }; |
| 1748 | 1750 |
| 1749 TEST_F(RTCStatsCollectorTestWithFakeCollector, ThreadUsageAndResultsMerging) { | 1751 TEST_F(RTCStatsCollectorTestWithFakeCollector, ThreadUsageAndResultsMerging) { |
| 1750 collector_->VerifyThreadUsageAndResultsMerging(); | 1752 collector_->VerifyThreadUsageAndResultsMerging(); |
| 1751 } | 1753 } |
| 1752 | 1754 |
| 1753 } // namespace | 1755 } // namespace |
| 1754 | 1756 |
| 1755 } // namespace webrtc | 1757 } // namespace webrtc |
| OLD | NEW |