Chromium Code Reviews| 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..8edfe498ec5b34e1210a3bbf0c7497e58cefbdba 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, ResetBweBitrates) { |
| + int new_bitrate = 200000; |
| + EXPECT_CALL(observer_, OnNetworkChanged(new_bitrate, _, _)); |
| + EXPECT_CALL(*pacer_, SetEstimatedBitrate(new_bitrate)); |
| + controller_->ResetBweBitrates(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_->ResetBweBitrates(-1, -1, -1); |
|
stefan-webrtc
2016/05/30 06:47:03
Is this a good behavior? Shouldn't we instead let
honghaiz3
2016/05/31 16:58:03
What do you mean by "previous bitrate"?
If you mea
stefan-webrtc
2016/05/31 17:27:49
I see.
I was thinking that if we want to reset on
|
| +} |
| + |
| TEST_F(CongestionControllerTest, |
| SignalNetworkStateAndQueueIsFullAndEstimateChange) { |
| // Send queue is full |