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

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

Issue 2000063003: Update the BWE when the network route changes. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Add TODO to re-create objects. Created 4 years, 7 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/congestion_controller/congestion_controller_unittest.cc
diff --git a/webrtc/modules/congestion_controller/congestion_controller_unittest.cc b/webrtc/modules/congestion_controller/congestion_controller_unittest.cc
index c82c75daf3cdd5f6f794cb26a5f715947d02ba3d..1a265824bc4784b5fbbf2db8ee930bc29dc1a02d 100644
--- a/webrtc/modules/congestion_controller/congestion_controller_unittest.cc
+++ b/webrtc/modules/congestion_controller/congestion_controller_unittest.cc
@@ -124,6 +124,20 @@ TEST_F(CongestionControllerTest, SignalNetworkState) {
controller_->SignalNetworkState(kNetworkDown);
}
+TEST_F(CongestionControllerTest, ResetBweAndBitrates) {
+ int new_bitrate = 200000;
+ EXPECT_CALL(observer_, OnNetworkChanged(new_bitrate, _, _));
+ EXPECT_CALL(*pacer_, SetEstimatedBitrate(new_bitrate));
+ controller_->ResetBweAndBitrates(new_bitrate, -1, -1);
+
+ // If the bitrate is reset to -1, the new starting bitrate will be
+ // the minimum default bitrate 10000bps.
+ int min_default_bitrate = 10000;
+ EXPECT_CALL(observer_, OnNetworkChanged(min_default_bitrate, _, _));
+ EXPECT_CALL(*pacer_, SetEstimatedBitrate(min_default_bitrate));
+ controller_->ResetBweAndBitrates(-1, -1, -1);
+}
+
TEST_F(CongestionControllerTest,
SignalNetworkStateAndQueueIsFullAndEstimateChange) {
// Send queue is full

Powered by Google App Engine
This is Rietveld 408576698