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

Unified Diff: webrtc/modules/congestion_controller/probe_bitrate_estimator_unittest.cc

Issue 2407143002: Remove GetFeedbackInterval in sender side BWE. (Closed)
Patch Set: Respond to comments Created 3 years, 8 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
« no previous file with comments | « webrtc/modules/congestion_controller/probe_bitrate_estimator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/congestion_controller/probe_bitrate_estimator_unittest.cc
diff --git a/webrtc/modules/congestion_controller/probe_bitrate_estimator_unittest.cc b/webrtc/modules/congestion_controller/probe_bitrate_estimator_unittest.cc
index f86c93fae3aeee6fd26475a3123fad3dadcdffbe..5686f57724ca79f63e9ecb0943d4503a51f21aec 100644
--- a/webrtc/modules/congestion_controller/probe_bitrate_estimator_unittest.cc
+++ b/webrtc/modules/congestion_controller/probe_bitrate_estimator_unittest.cc
@@ -193,4 +193,21 @@ TEST_F(TestProbeBitrateEstimator, IgnoreSizeFirstReceivePacket) {
EXPECT_NEAR(measured_bps_, 800000, 10);
}
+TEST_F(TestProbeBitrateEstimator, NoLastEstimatedBitrateBps) {
+ EXPECT_FALSE(probe_bitrate_estimator_.FetchAndResetLastEstimatedBitrateBps());
+}
+
+TEST_F(TestProbeBitrateEstimator, FetchLastEstimatedBitrateBps) {
+ AddPacketFeedback(0, 1000, 0, 10);
+ AddPacketFeedback(0, 1000, 10, 20);
+ AddPacketFeedback(0, 1000, 20, 30);
+ AddPacketFeedback(0, 1000, 30, 40);
+
+ auto estimated_bitrate_bps =
+ probe_bitrate_estimator_.FetchAndResetLastEstimatedBitrateBps();
+ EXPECT_TRUE(estimated_bitrate_bps);
+ EXPECT_NEAR(*estimated_bitrate_bps, 800000, 10);
+ EXPECT_FALSE(probe_bitrate_estimator_.FetchAndResetLastEstimatedBitrateBps());
+}
+
} // namespace webrtc
« no previous file with comments | « webrtc/modules/congestion_controller/probe_bitrate_estimator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698