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

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

Issue 2714503002: Perform probing on network route change. (Closed)
Patch Set: SendTimeHistoryTest.Clear fix. Created 3 years, 9 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
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 ca0d28fcd5c8cfbd819cdbcd9c98ac3bc62f7738..925631b9bb1064116085e8fe275f0d1acceba96c 100644
--- a/webrtc/modules/congestion_controller/congestion_controller_unittest.cc
+++ b/webrtc/modules/congestion_controller/congestion_controller_unittest.cc
@@ -59,6 +59,8 @@ class CongestionControllerTest : public ::testing::Test {
// to be updated.
EXPECT_CALL(observer_, OnNetworkChanged(kInitialBitrateBps, _, _, _));
EXPECT_CALL(*pacer_, SetEstimatedBitrate(kInitialBitrateBps));
+ EXPECT_CALL(*pacer_, CreateProbeCluster(kInitialBitrateBps * 3));
+ EXPECT_CALL(*pacer_, CreateProbeCluster(kInitialBitrateBps * 5));
controller_->SetBweBitrates(0, kInitialBitrateBps, 5 * kInitialBitrateBps);
}
@@ -143,6 +145,7 @@ TEST_F(CongestionControllerTest, SignalNetworkState) {
TEST_F(CongestionControllerTest, ResetBweAndBitrates) {
int new_bitrate = 200000;
+ testing::Mock::VerifyAndClearExpectations(pacer_);
EXPECT_CALL(observer_, OnNetworkChanged(new_bitrate, _, _, _));
EXPECT_CALL(*pacer_, SetEstimatedBitrate(new_bitrate));
controller_->ResetBweAndBitrates(new_bitrate, -1, -1);
@@ -240,5 +243,15 @@ TEST_F(CongestionControllerTest, OnReceivedPacketWithAbsSendTime) {
ASSERT_EQ(1u, ssrcs.size());
EXPECT_EQ(header.ssrc, ssrcs[0]);
}
+
+TEST_F(CongestionControllerTest, ProbeOnBweReset) {
+ testing::Mock::VerifyAndClearExpectations(pacer_);
+ EXPECT_CALL(*pacer_, CreateProbeCluster(kInitialBitrateBps * 6));
+ EXPECT_CALL(*pacer_, CreateProbeCluster(kInitialBitrateBps * 12));
+ EXPECT_CALL(observer_, OnNetworkChanged(kInitialBitrateBps * 2, _, _, _));
+ controller_->ResetBweAndBitrates(2 * kInitialBitrateBps, 0,
+ 20 * kInitialBitrateBps);
+}
+
} // namespace test
} // namespace webrtc
« no previous file with comments | « webrtc/modules/congestion_controller/congestion_controller.cc ('k') | webrtc/modules/congestion_controller/probe_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698