| Index: net/quic/congestion_control/tcp_cubic_sender_test.cc
|
| diff --git a/net/quic/congestion_control/tcp_cubic_sender_test.cc b/net/quic/congestion_control/tcp_cubic_sender_test.cc
|
| index e4737eb16854fc1eb1ad0ed47abdcd3a3ef347bd..ebea8aeccaa40dbf961b20160e4b46d4568d4a0c 100644
|
| --- a/net/quic/congestion_control/tcp_cubic_sender_test.cc
|
| +++ b/net/quic/congestion_control/tcp_cubic_sender_test.cc
|
| @@ -718,14 +718,26 @@ TEST_F(TcpCubicSenderTest, BandwidthResumption) {
|
| // Ensure that an old estimate is not used for bandwidth resumption.
|
| cached_network_params.set_timestamp(clock_.WallNow().ToUNIXSeconds() -
|
| (kNumSecondsPerHour + 1));
|
| - sender_->ResumeConnectionState(cached_network_params);
|
| + EXPECT_FALSE(sender_->ResumeConnectionState(cached_network_params));
|
| EXPECT_EQ(10u, sender_->congestion_window());
|
|
|
| // If the estimate is new enough, make sure it is used.
|
| cached_network_params.set_timestamp(clock_.WallNow().ToUNIXSeconds() -
|
| (kNumSecondsPerHour - 1));
|
| - sender_->ResumeConnectionState(cached_network_params);
|
| + EXPECT_TRUE(sender_->ResumeConnectionState(cached_network_params));
|
| EXPECT_EQ(kNumberOfPackets, sender_->congestion_window());
|
| +
|
| + // Resumed CWND is limited to be in a sensible range.
|
| + cached_network_params.set_bandwidth_estimate_bytes_per_second(
|
| + (kMaxTcpCongestionWindow + 1) * kMaxPacketSize);
|
| + EXPECT_TRUE(sender_->ResumeConnectionState(cached_network_params));
|
| + EXPECT_EQ(kMaxTcpCongestionWindow, sender_->congestion_window());
|
| +
|
| + cached_network_params.set_bandwidth_estimate_bytes_per_second(
|
| + (kMinCongestionWindowForBandwidthResumption - 1) * kMaxPacketSize);
|
| + EXPECT_TRUE(sender_->ResumeConnectionState(cached_network_params));
|
| + EXPECT_EQ(kMinCongestionWindowForBandwidthResumption,
|
| + sender_->congestion_window());
|
| }
|
|
|
| } // namespace test
|
|
|