Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1159)

Side by Side Diff: webrtc/api/rtcstatscollector_unittest.cc

Issue 2565463002: RTCIceCandidatePairStats.requestsReceived defined by RTCStatsCollector. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 998
999 SessionStats session_stats; 999 SessionStats session_stats;
1000 1000
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.recv_ping_requests = 2020;
1008 connection_info.sent_ping_requests_total = 1010; 1009 connection_info.sent_ping_requests_total = 1010;
1009 connection_info.recv_ping_responses = 4321; 1010 connection_info.recv_ping_responses = 4321;
1010 connection_info.sent_ping_responses = 1000; 1011 connection_info.sent_ping_responses = 1000;
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);
(...skipping 14 matching lines...) Expand all
1032 expected_pair.transport_id = 1033 expected_pair.transport_id =
1033 "RTCTransport_transport_" + 1034 "RTCTransport_transport_" +
1034 rtc::ToString<>(cricket::ICE_CANDIDATE_COMPONENT_RTP); 1035 rtc::ToString<>(cricket::ICE_CANDIDATE_COMPONENT_RTP);
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;
1043 expected_pair.requests_received = 2020;
1042 expected_pair.requests_sent = 1010; 1044 expected_pair.requests_sent = 1010;
1043 expected_pair.responses_received = 4321; 1045 expected_pair.responses_received = 4321;
1044 expected_pair.responses_sent = 1000; 1046 expected_pair.responses_sent = 1000;
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));
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698