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

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

Issue 2562703007: RTCOutboundRTPStreamStats.roundTripTime: Only report non-negative values. (Closed)
Patch Set: Unittest testing that it defaults to undefined 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
« no previous file with comments | « no previous file | webrtc/api/rtcstatscollector.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 return verifier.ExpectAllMembersSuccessfullyTested(); 490 return verifier.ExpectAllMembersSuccessfullyTested();
491 } 491 }
492 492
493 bool VerifyRTCOutboundRTPStreamStats( 493 bool VerifyRTCOutboundRTPStreamStats(
494 const RTCOutboundRTPStreamStats& outbound_stream) { 494 const RTCOutboundRTPStreamStats& outbound_stream) {
495 RTCStatsVerifier verifier(report_, &outbound_stream); 495 RTCStatsVerifier verifier(report_, &outbound_stream);
496 VerifyRTCRTPStreamStats(outbound_stream, &verifier); 496 VerifyRTCRTPStreamStats(outbound_stream, &verifier);
497 verifier.TestMemberIsDefined(outbound_stream.packets_sent); 497 verifier.TestMemberIsDefined(outbound_stream.packets_sent);
498 verifier.TestMemberIsDefined(outbound_stream.bytes_sent); 498 verifier.TestMemberIsDefined(outbound_stream.bytes_sent);
499 verifier.TestMemberIsUndefined(outbound_stream.target_bitrate); 499 verifier.TestMemberIsUndefined(outbound_stream.target_bitrate);
500 verifier.TestMemberIsDefined(outbound_stream.round_trip_time); 500 // TODO(hbos): Defined in video but not audio case. Why? crbug.com/669877
501 verifier.MarkMemberTested(outbound_stream.round_trip_time, true);
501 return verifier.ExpectAllMembersSuccessfullyTested(); 502 return verifier.ExpectAllMembersSuccessfullyTested();
502 } 503 }
503 504
504 bool VerifyRTCTransportStats( 505 bool VerifyRTCTransportStats(
505 const RTCTransportStats& transport) { 506 const RTCTransportStats& transport) {
506 RTCStatsVerifier verifier(report_, &transport); 507 RTCStatsVerifier verifier(report_, &transport);
507 verifier.TestMemberIsDefined(transport.bytes_sent); 508 verifier.TestMemberIsDefined(transport.bytes_sent);
508 verifier.TestMemberIsDefined(transport.bytes_received); 509 verifier.TestMemberIsDefined(transport.bytes_received);
509 verifier.TestMemberIsOptionalIDReference( 510 verifier.TestMemberIsOptionalIDReference(
510 transport.rtcp_transport_stats_id, RTCTransportStats::kType); 511 transport.rtcp_transport_stats_id, RTCTransportStats::kType);
(...skipping 18 matching lines...) Expand all
529 TEST_F(RTCStatsIntegrationTest, GetStatsFromCallee) { 530 TEST_F(RTCStatsIntegrationTest, GetStatsFromCallee) {
530 StartCall(); 531 StartCall();
531 532
532 rtc::scoped_refptr<const RTCStatsReport> report = GetStatsFromCallee(); 533 rtc::scoped_refptr<const RTCStatsReport> report = GetStatsFromCallee();
533 RTCStatsReportVerifier(report.get()).VerifyReport(); 534 RTCStatsReportVerifier(report.get()).VerifyReport();
534 } 535 }
535 536
536 } // namespace 537 } // namespace
537 538
538 } // namespace webrtc 539 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/rtcstatscollector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698