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

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

Issue 2634883003: Initiate mid-call probing even if estimated bitrate is at max configured bitrate. (Closed)
Patch Set: Rebase Created 3 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/congestion_controller/probe_controller.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_controller_unittest.cc
diff --git a/webrtc/modules/congestion_controller/probe_controller_unittest.cc b/webrtc/modules/congestion_controller/probe_controller_unittest.cc
index fd6ecc137fb75373647738079aed41014c61d8b1..19a9039adafa111aee4591281b978f09ce80d915 100644
--- a/webrtc/modules/congestion_controller/probe_controller_unittest.cc
+++ b/webrtc/modules/congestion_controller/probe_controller_unittest.cc
@@ -79,6 +79,21 @@ TEST_F(ProbeControllerTest, InitiatesProbingOnMaxBitrateIncrease) {
kMaxBitrateBps + 100);
}
+TEST_F(ProbeControllerTest, InitiatesProbingOnMaxBitrateIncreaseAtMaxBitrate) {
+ EXPECT_CALL(pacer_, CreateProbeCluster(_)).Times(AtLeast(2));
+ probe_controller_->SetBitrates(kMinBitrateBps, kStartBitrateBps,
+ kMaxBitrateBps);
+ // Long enough to time out exponential probing.
+ clock_.AdvanceTimeMilliseconds(kExponentialProbingTimeoutMs);
+ probe_controller_->SetEstimatedBitrate(kStartBitrateBps);
+ probe_controller_->Process();
+
+ probe_controller_->SetEstimatedBitrate(kMaxBitrateBps);
+ EXPECT_CALL(pacer_, CreateProbeCluster(kMaxBitrateBps + 100));
+ probe_controller_->SetBitrates(kMinBitrateBps, kStartBitrateBps,
+ kMaxBitrateBps + 100);
+}
+
TEST_F(ProbeControllerTest, TestExponentialProbing) {
probe_controller_->SetBitrates(kMinBitrateBps, kStartBitrateBps,
kMaxBitrateBps);
« no previous file with comments | « webrtc/modules/congestion_controller/probe_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698