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

Unified Diff: webrtc/modules/bitrate_controller/bitrate_controller_unittest.cc

Issue 2223033002: Fix issue where the number of packets reported in tests/simulations sometimes are negative. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/bitrate_controller/bitrate_controller_unittest.cc
diff --git a/webrtc/modules/bitrate_controller/bitrate_controller_unittest.cc b/webrtc/modules/bitrate_controller/bitrate_controller_unittest.cc
index b40332e5dbb4c0ecbbd6c9d4df892aca0a5e07e5..a70eecf2415b48cb8bf0e7aae666dd7b2a3b8c10 100644
--- a/webrtc/modules/bitrate_controller/bitrate_controller_unittest.cc
+++ b/webrtc/modules/bitrate_controller/bitrate_controller_unittest.cc
@@ -152,14 +152,14 @@ TEST_F(BitrateControllerTest, OneBitrateObserverOneRtcpObserver) {
time_ms += 1000;
report_blocks.clear();
- report_blocks.push_back(CreateReportBlock(1, 2, 0, 801));
+ report_blocks.push_back(CreateReportBlock(1, 2, 0, 101));
bandwidth_observer_->OnReceivedRtcpReceiverReport(report_blocks, 50, time_ms);
EXPECT_EQ(299732, bitrate_observer_.last_bitrate_);
time_ms += 1000;
// Reach max cap.
report_blocks.clear();
- report_blocks.push_back(CreateReportBlock(1, 2, 0, 101));
+ report_blocks.push_back(CreateReportBlock(1, 2, 0, 121));
bandwidth_observer_->OnReceivedRtcpReceiverReport(report_blocks, 50, time_ms);
EXPECT_EQ(300000, bitrate_observer_.last_bitrate_);
time_ms += 1000;

Powered by Google App Engine
This is Rietveld 408576698