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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc

Issue 2992043002: Renamed fields in common_types.h/RtcpStatistics. (Closed)
Patch Set: Rebase on new master Created 3 years, 4 months 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 | « webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc ('k') | webrtc/video/end_to_end_tests.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 (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 rtcp::ReportBlock rb1; 1040 rtcp::ReportBlock rb1;
1041 rb1.SetMediaSsrc(kReceiverMainSsrc); 1041 rb1.SetMediaSsrc(kReceiverMainSsrc);
1042 rb1.SetExtHighestSeqNum(kSequenceNumber); 1042 rb1.SetExtHighestSeqNum(kSequenceNumber);
1043 rb1.SetFractionLost(kFractionLoss); 1043 rb1.SetFractionLost(kFractionLoss);
1044 rb1.SetCumulativeLost(kCumulativeLoss); 1044 rb1.SetCumulativeLost(kCumulativeLoss);
1045 rb1.SetJitter(kJitter); 1045 rb1.SetJitter(kJitter);
1046 1046
1047 rtcp::ReceiverReport rr1; 1047 rtcp::ReceiverReport rr1;
1048 rr1.SetSenderSsrc(kSenderSsrc); 1048 rr1.SetSenderSsrc(kSenderSsrc);
1049 rr1.AddReportBlock(rb1); 1049 rr1.AddReportBlock(rb1);
1050 EXPECT_CALL( 1050 EXPECT_CALL(callback,
1051 callback, 1051 StatisticsUpdated(
1052 StatisticsUpdated( 1052 AllOf(Field(&RtcpStatistics::fraction_lost, kFractionLoss),
1053 AllOf(Field(&RtcpStatistics::fraction_lost, kFractionLoss), 1053 Field(&RtcpStatistics::packets_lost, kCumulativeLoss),
1054 Field(&RtcpStatistics::cumulative_lost, kCumulativeLoss), 1054 Field(&RtcpStatistics::extended_highest_sequence_number,
1055 Field(&RtcpStatistics::extended_max_sequence_number, 1055 kSequenceNumber),
1056 kSequenceNumber), 1056 Field(&RtcpStatistics::jitter, kJitter)),
1057 Field(&RtcpStatistics::jitter, kJitter)), 1057 kReceiverMainSsrc));
1058 kReceiverMainSsrc));
1059 EXPECT_CALL(rtp_rtcp_impl_, OnReceivedRtcpReportBlocks(_)); 1058 EXPECT_CALL(rtp_rtcp_impl_, OnReceivedRtcpReportBlocks(_));
1060 EXPECT_CALL(bandwidth_observer_, OnReceivedRtcpReceiverReport(_, _, _)); 1059 EXPECT_CALL(bandwidth_observer_, OnReceivedRtcpReceiverReport(_, _, _));
1061 InjectRtcpPacket(rr1); 1060 InjectRtcpPacket(rr1);
1062 1061
1063 rtcp_receiver_.RegisterRtcpStatisticsCallback(nullptr); 1062 rtcp_receiver_.RegisterRtcpStatisticsCallback(nullptr);
1064 1063
1065 // Add arbitrary numbers, callback should not be called. 1064 // Add arbitrary numbers, callback should not be called.
1066 rtcp::ReportBlock rb2; 1065 rtcp::ReportBlock rb2;
1067 rb2.SetMediaSsrc(kReceiverMainSsrc); 1066 rb2.SetMediaSsrc(kReceiverMainSsrc);
1068 rb2.SetExtHighestSeqNum(kSequenceNumber + 1); 1067 rb2.SetExtHighestSeqNum(kSequenceNumber + 1);
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1239 1238
1240 rtcp::ExtendedReports xr; 1239 rtcp::ExtendedReports xr;
1241 xr.SetTargetBitrate(bitrate); 1240 xr.SetTargetBitrate(bitrate);
1242 1241
1243 EXPECT_CALL(bitrate_allocation_observer_, 1242 EXPECT_CALL(bitrate_allocation_observer_,
1244 OnBitrateAllocationUpdated(expected_allocation)); 1243 OnBitrateAllocationUpdated(expected_allocation));
1245 InjectRtcpPacket(xr); 1244 InjectRtcpPacket(xr);
1246 } 1245 }
1247 1246
1248 } // namespace webrtc 1247 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc ('k') | webrtc/video/end_to_end_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698