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

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

Issue 1615873002: Fix probing breakage with send-side BWE introduced by r11322. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix test. Created 4 years, 11 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/bitrate_controller/send_side_bandwidth_estimation.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698