| 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 61ca559a5364ae928ff5d8d023700f0d052e4671..6d025282bcadd2b62dc62fa4bfc3919123f9bcaa 100644
|
| --- a/webrtc/modules/congestion_controller/probe_controller_unittest.cc
|
| +++ b/webrtc/modules/congestion_controller/probe_controller_unittest.cc
|
| @@ -83,8 +83,8 @@ TEST_F(ProbeControllerTest, TestExponentialProbing) {
|
| probe_controller_->SetBitrates(kMinBitrateBps, kStartBitrateBps,
|
| kMaxBitrateBps);
|
|
|
| - // Repeated probe should only be sent when estimated bitrate climbs above 4 *
|
| - // kStartBitrateBps = 1200.
|
| + // Repeated probe should only be sent when estimated bitrate climbs above
|
| + // 0.7 * 6 * kStartBitrateBps = 1260.
|
| EXPECT_CALL(pacer_, CreateProbeCluster(_, _)).Times(0);
|
| probe_controller_->SetEstimatedBitrate(1000);
|
| testing::Mock::VerifyAndClearExpectations(&pacer_);
|
| @@ -160,5 +160,19 @@ TEST_F(ProbeControllerTest, PeriodicProbing) {
|
| testing::Mock::VerifyAndClearExpectations(&pacer_);
|
| }
|
|
|
| +TEST_F(ProbeControllerTest, TestExponentialProbingOverflow) {
|
| + int kMbps = 1000000;
|
| + probe_controller_->SetBitrates(kMinBitrateBps, 10 * kMbps, 100 * kMbps);
|
| +
|
| + // Verify that probe bitrate is capped at the specified max bitrate
|
| + EXPECT_CALL(pacer_, CreateProbeCluster(100 * kMbps, _));
|
| + probe_controller_->SetEstimatedBitrate(60 * kMbps);
|
| + testing::Mock::VerifyAndClearExpectations(&pacer_);
|
| +
|
| + // Verify that repeated probes aren't sent.
|
| + EXPECT_CALL(pacer_, CreateProbeCluster(_, _)).Times(0);
|
| + probe_controller_->SetEstimatedBitrate(100 * kMbps);
|
| +}
|
| +
|
| } // namespace test
|
| } // namespace webrtc
|
|
|