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 a72d80bbb31ddaa4a1d03789cef2d6a98f3e4513..42bb5267b2f2bbe8d92aa438cd5bd068847061f5 100644 |
--- a/webrtc/modules/congestion_controller/congestion_controller_unittest.cc |
+++ b/webrtc/modules/congestion_controller/congestion_controller_unittest.cc |
@@ -46,7 +46,7 @@ |
// Set the initial bitrate estimate and expect the |observer| and |pacer_| |
// to be updated. |
- EXPECT_CALL(observer_, OnNetworkChanged(kInitialBitrateBps, _, _, _)); |
+ EXPECT_CALL(observer_, OnNetworkChanged(kInitialBitrateBps, _, _)); |
EXPECT_CALL(*pacer_, SetEstimatedBitrate(kInitialBitrateBps)); |
controller_->SetBweBitrates(0, kInitialBitrateBps, 5 * kInitialBitrateBps); |
} |
@@ -66,13 +66,13 @@ |
clock_.AdvanceTimeMilliseconds(25); |
controller_->Process(); |
- EXPECT_CALL(observer_, OnNetworkChanged(kInitialBitrateBps * 2, _, _, _)); |
+ EXPECT_CALL(observer_, OnNetworkChanged(kInitialBitrateBps * 2, _, _)); |
EXPECT_CALL(*pacer_, SetEstimatedBitrate(kInitialBitrateBps * 2)); |
bandwidth_observer_->OnReceivedEstimatedBitrate(kInitialBitrateBps * 2); |
clock_.AdvanceTimeMilliseconds(25); |
controller_->Process(); |
- EXPECT_CALL(observer_, OnNetworkChanged(kInitialBitrateBps, _, _, _)); |
+ EXPECT_CALL(observer_, OnNetworkChanged(kInitialBitrateBps, _, _)); |
EXPECT_CALL(*pacer_, SetEstimatedBitrate(kInitialBitrateBps)); |
bandwidth_observer_->OnReceivedEstimatedBitrate(kInitialBitrateBps); |
clock_.AdvanceTimeMilliseconds(25); |
@@ -83,21 +83,21 @@ |
EXPECT_CALL(*pacer_, ExpectedQueueTimeMs()) |
.WillOnce(Return(PacedSender::kMaxQueueLengthMs + 1)); |
- EXPECT_CALL(observer_, OnNetworkChanged(0, _, _, _)); |
+ EXPECT_CALL(observer_, OnNetworkChanged(0, _, _)); |
controller_->Process(); |
// Let the pacer not be full next time the controller checks. |
EXPECT_CALL(*pacer_, ExpectedQueueTimeMs()) |
.WillOnce(Return(PacedSender::kMaxQueueLengthMs - 1)); |
- EXPECT_CALL(observer_, OnNetworkChanged(kInitialBitrateBps, _, _, _)); |
+ EXPECT_CALL(observer_, OnNetworkChanged(kInitialBitrateBps, _, _)); |
controller_->Process(); |
} |
TEST_F(CongestionControllerTest, OnSendQueueFullAndEstimateChange) { |
EXPECT_CALL(*pacer_, ExpectedQueueTimeMs()) |
.WillOnce(Return(PacedSender::kMaxQueueLengthMs + 1)); |
- EXPECT_CALL(observer_, OnNetworkChanged(0, _, _, _)); |
+ EXPECT_CALL(observer_, OnNetworkChanged(0, _, _)); |
controller_->Process(); |
// Receive new estimate but let the queue still be full. |
@@ -113,33 +113,32 @@ |
// |OnNetworkChanged| should be called with the new estimate. |
EXPECT_CALL(*pacer_, ExpectedQueueTimeMs()) |
.WillOnce(Return(PacedSender::kMaxQueueLengthMs - 1)); |
- EXPECT_CALL(observer_, OnNetworkChanged(kInitialBitrateBps * 2, _, _, _)); |
+ EXPECT_CALL(observer_, OnNetworkChanged(kInitialBitrateBps * 2, _, _)); |
clock_.AdvanceTimeMilliseconds(25); |
controller_->Process(); |
} |
TEST_F(CongestionControllerTest, SignalNetworkState) { |
- EXPECT_CALL(observer_, OnNetworkChanged(0, _, _, _)); |
+ EXPECT_CALL(observer_, OnNetworkChanged(0, _, _)); |
controller_->SignalNetworkState(kNetworkDown); |
- EXPECT_CALL(observer_, OnNetworkChanged(kInitialBitrateBps, _, _, _)); |
+ EXPECT_CALL(observer_, OnNetworkChanged(kInitialBitrateBps, _, _)); |
controller_->SignalNetworkState(kNetworkUp); |
- EXPECT_CALL(observer_, OnNetworkChanged(0, _, _, _)); |
+ EXPECT_CALL(observer_, OnNetworkChanged(0, _, _)); |
controller_->SignalNetworkState(kNetworkDown); |
} |
TEST_F(CongestionControllerTest, ResetBweAndBitrates) { |
int new_bitrate = 200000; |
- EXPECT_CALL(observer_, OnNetworkChanged(new_bitrate, _, _, _)); |
+ EXPECT_CALL(observer_, OnNetworkChanged(new_bitrate, _, _)); |
EXPECT_CALL(*pacer_, SetEstimatedBitrate(new_bitrate)); |
controller_->ResetBweAndBitrates(new_bitrate, -1, -1); |
// If the bitrate is reset to -1, the new starting bitrate will be |
// the minimum default bitrate kMinBitrateBps. |
- EXPECT_CALL( |
- observer_, |
- OnNetworkChanged(congestion_controller::GetMinBitrateBps(), _, _, _)); |
+ EXPECT_CALL(observer_, OnNetworkChanged( |
+ congestion_controller::GetMinBitrateBps(), _, _)); |
EXPECT_CALL(*pacer_, |
SetEstimatedBitrate(congestion_controller::GetMinBitrateBps())); |
controller_->ResetBweAndBitrates(-1, -1, -1); |
@@ -150,7 +149,7 @@ |
// Send queue is full |
EXPECT_CALL(*pacer_, ExpectedQueueTimeMs()) |
.WillRepeatedly(Return(PacedSender::kMaxQueueLengthMs + 1)); |
- EXPECT_CALL(observer_, OnNetworkChanged(0, _, _, _)); |
+ EXPECT_CALL(observer_, OnNetworkChanged(0, _, _)); |
controller_->Process(); |
// Queue is full and network is down. Expect no bitrate change. |
@@ -170,12 +169,12 @@ |
// Let the pacer not be full next time the controller checks. |
EXPECT_CALL(*pacer_, ExpectedQueueTimeMs()) |
.WillOnce(Return(PacedSender::kMaxQueueLengthMs - 1)); |
- EXPECT_CALL(observer_, OnNetworkChanged(kInitialBitrateBps * 2, _, _, _)); |
+ EXPECT_CALL(observer_, OnNetworkChanged(kInitialBitrateBps * 2, _, _)); |
controller_->Process(); |
} |
TEST_F(CongestionControllerTest, GetPacerQueuingDelayMs) { |
- EXPECT_CALL(observer_, OnNetworkChanged(_, _, _, _)).Times(AtLeast(1)); |
+ EXPECT_CALL(observer_, OnNetworkChanged(_, _, _)).Times(AtLeast(1)); |
const int64_t kQueueTimeMs = 123; |
EXPECT_CALL(*pacer_, QueueInMs()).WillRepeatedly(Return(kQueueTimeMs)); |
@@ -190,16 +189,5 @@ |
EXPECT_EQ(kQueueTimeMs, controller_->GetPacerQueuingDelayMs()); |
} |
-TEST_F(CongestionControllerTest, GetProbingInterval) { |
- clock_.AdvanceTimeMilliseconds(25); |
- controller_->Process(); |
- |
- EXPECT_CALL(observer_, OnNetworkChanged(_, _, _, testing::Ne(0))); |
- EXPECT_CALL(*pacer_, SetEstimatedBitrate(_)); |
- bandwidth_observer_->OnReceivedEstimatedBitrate(kInitialBitrateBps * 2); |
- clock_.AdvanceTimeMilliseconds(25); |
- controller_->Process(); |
-} |
- |
} // namespace test |
} // namespace webrtc |