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

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

Issue 1932683002: Remove ViEEncoder::SetNetworkStatus (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@move_pacer
Patch Set: Created 4 years, 8 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/bitrate_controller/bitrate_controller_unittest.cc
diff --git a/webrtc/modules/bitrate_controller/bitrate_controller_unittest.cc b/webrtc/modules/bitrate_controller/bitrate_controller_unittest.cc
index 4fd112310c1632bac9fbc08cb9017585f69f3b61..11b006d6ab8c4781858165bcb43f1fbe5b59ae2e 100644
--- a/webrtc/modules/bitrate_controller/bitrate_controller_unittest.cc
+++ b/webrtc/modules/bitrate_controller/bitrate_controller_unittest.cc
@@ -66,6 +66,7 @@ class BitrateControllerTest : public ::testing::Test {
~BitrateControllerTest() {}
virtual void SetUp() {
+ ON_CALL(pacer_, CanSendMorePackets()).WillByDefault(Return(true));
controller_ = BitrateController::CreateBitrateController(
&clock_, &bitrate_observer_, &pacer_);
controller_->SetStartBitrate(kStartBitrateBps);
@@ -409,15 +410,13 @@ TEST_F(BitrateControllerTest, SetReservedBitrate) {
TEST_F(BitrateControllerTest, OnSendQueueFull) {
bandwidth_observer_->OnReceivedEstimatedBitrate(200000);
EXPECT_EQ(200000, bitrate_observer_.last_bitrate_);
- // Let the pacer be full next time the controller checks.
- EXPECT_CALL(pacer_, ExpectedQueueTimeMs())
- .WillOnce(Return(PacedSender::kMaxQueueLengthMs + 1));
+ // Let the pacer return not ready next time the controller checks.
+ EXPECT_CALL(pacer_, CanSendMorePackets()).WillOnce(Return(false));
clock_.AdvanceTimeMilliseconds(25);
controller_->Process();
EXPECT_EQ(0, bitrate_observer_.last_bitrate_);
// Let the pacer not be full next time the controller checks.
- EXPECT_CALL(pacer_, ExpectedQueueTimeMs())
- .WillOnce(Return(PacedSender::kMaxQueueLengthMs - 1));
+ EXPECT_CALL(pacer_, CanSendMorePackets()).WillOnce(Return(true));
clock_.AdvanceTimeMilliseconds(25);
controller_->Process();
EXPECT_EQ(200000, bitrate_observer_.last_bitrate_);

Powered by Google App Engine
This is Rietveld 408576698