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

Unified Diff: net/quic/congestion_control/tcp_cubic_bytes_sender_test.cc

Issue 1037633002: Add a QUIC connection option(BWMX) to resume to the max bandwidth (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Populate_RTT_info_89043159
Patch Set: Created 5 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: net/quic/congestion_control/tcp_cubic_bytes_sender_test.cc
diff --git a/net/quic/congestion_control/tcp_cubic_bytes_sender_test.cc b/net/quic/congestion_control/tcp_cubic_bytes_sender_test.cc
index 76566a137ca8743cf720a3e9de484b6606e987d2..63b5232ad5e5efdc66f48b65127d50a3f3e5e28f 100644
--- a/net/quic/congestion_control/tcp_cubic_bytes_sender_test.cc
+++ b/net/quic/congestion_control/tcp_cubic_bytes_sender_test.cc
@@ -613,27 +613,34 @@ TEST_F(TcpCubicBytesSenderTest, BandwidthResumption) {
// Ensure that an old estimate is not used for bandwidth resumption.
cached_network_params.set_timestamp(clock_.WallNow().ToUNIXSeconds() -
(kNumSecondsPerHour + 1));
- EXPECT_FALSE(sender_->ResumeConnectionState(cached_network_params));
+ EXPECT_FALSE(sender_->ResumeConnectionState(cached_network_params, false));
EXPECT_EQ(10u * kDefaultTCPMSS, sender_->GetCongestionWindow());
// If the estimate is new enough, make sure it is used.
cached_network_params.set_timestamp(clock_.WallNow().ToUNIXSeconds() -
(kNumSecondsPerHour - 1));
- EXPECT_TRUE(sender_->ResumeConnectionState(cached_network_params));
+ EXPECT_TRUE(sender_->ResumeConnectionState(cached_network_params, false));
EXPECT_EQ(kNumberOfPackets * kDefaultTCPMSS, sender_->GetCongestionWindow());
// Resumed CWND is limited to be in a sensible range.
cached_network_params.set_bandwidth_estimate_bytes_per_second(
(kMaxTcpCongestionWindow + 1) * kDefaultTCPMSS);
- EXPECT_TRUE(sender_->ResumeConnectionState(cached_network_params));
+ EXPECT_TRUE(sender_->ResumeConnectionState(cached_network_params, false));
EXPECT_EQ(kMaxTcpCongestionWindow * kDefaultTCPMSS,
sender_->GetCongestionWindow());
cached_network_params.set_bandwidth_estimate_bytes_per_second(
(kMinCongestionWindowForBandwidthResumption - 1) * kDefaultTCPMSS);
- EXPECT_TRUE(sender_->ResumeConnectionState(cached_network_params));
+ EXPECT_TRUE(sender_->ResumeConnectionState(cached_network_params, false));
EXPECT_EQ(kMinCongestionWindowForBandwidthResumption * kDefaultTCPMSS,
sender_->GetCongestionWindow());
+
+ // Resume to the max value.
+ cached_network_params.set_max_bandwidth_estimate_bytes_per_second(
+ (kMinCongestionWindowForBandwidthResumption + 10) * kDefaultTCPMSS);
+ EXPECT_TRUE(sender_->ResumeConnectionState(cached_network_params, true));
+ EXPECT_EQ((kMinCongestionWindowForBandwidthResumption + 10) * kDefaultTCPMSS,
+ sender_->GetCongestionWindow());
}
} // namespace test
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_bytes_sender.cc ('k') | net/quic/congestion_control/tcp_cubic_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698