| Index: webrtc/modules/bitrate_controller/send_side_bandwidth_estimation_unittest.cc
|
| diff --git a/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation_unittest.cc b/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation_unittest.cc
|
| index 0424d22bd683a40cb4ccff6dbd222f032a359891..a6fda5be35d9b8cd3fc7adc8e8c8b85528bc45cf 100644
|
| --- a/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation_unittest.cc
|
| +++ b/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation_unittest.cc
|
| @@ -16,7 +16,7 @@
|
|
|
| namespace webrtc {
|
|
|
| -TEST(SendSideBweTest, InitialRembWithProbing) {
|
| +void TestProbing(bool use_delay_based) {
|
| SendSideBandwidthEstimation bwe;
|
| bwe.SetMinMaxBitrate(100000, 1500000);
|
| bwe.SetSendBitrate(200000);
|
| @@ -28,7 +28,11 @@ TEST(SendSideBweTest, InitialRembWithProbing) {
|
| bwe.UpdateReceiverBlock(0, 50, 1, now_ms);
|
|
|
| // Initial REMB applies immediately.
|
| - bwe.UpdateReceiverEstimate(now_ms, kRembBps);
|
| + if (use_delay_based) {
|
| + bwe.UpdateDelayBasedEstimate(now_ms, kRembBps);
|
| + } else {
|
| + bwe.UpdateReceiverEstimate(now_ms, kRembBps);
|
| + }
|
| bwe.UpdateEstimate(now_ms);
|
| int bitrate;
|
| uint8_t fraction_loss;
|
| @@ -38,13 +42,25 @@ TEST(SendSideBweTest, InitialRembWithProbing) {
|
|
|
| // Second REMB doesn't apply immediately.
|
| now_ms += 2001;
|
| - bwe.UpdateReceiverEstimate(now_ms, kSecondRembBps);
|
| + if (use_delay_based) {
|
| + bwe.UpdateDelayBasedEstimate(now_ms, kSecondRembBps);
|
| + } else {
|
| + bwe.UpdateReceiverEstimate(now_ms, kSecondRembBps);
|
| + }
|
| bwe.UpdateEstimate(now_ms);
|
| bitrate = 0;
|
| bwe.CurrentEstimate(&bitrate, &fraction_loss, &rtt);
|
| EXPECT_EQ(kRembBps, bitrate);
|
| }
|
|
|
| +TEST(SendSideBweTest, InitialRembWithProbing) {
|
| + TestProbing(false);
|
| +}
|
| +
|
| +TEST(SendSideBweTest, InitialDelayBasedBweWithProbing) {
|
| + TestProbing(true);
|
| +}
|
| +
|
| TEST(SendSideBweTest, DoesntReapplyBitrateDecreaseWithoutFollowingRemb) {
|
| SendSideBandwidthEstimation bwe;
|
| static const int kMinBitrateBps = 100000;
|
|
|