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

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

Issue 1983183002: Landing Recent QUIC changes until 5/14/2016 02:25:25 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: "first try to fix link error for win_clang build" Created 4 years, 7 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_sender_bytes_test.cc
diff --git a/net/quic/congestion_control/tcp_cubic_sender_bytes_test.cc b/net/quic/congestion_control/tcp_cubic_sender_bytes_test.cc
index 0e471c0256da8f0c919a42fa0db904b79beafbcd..7e2c0ad94ae7c01b677e100c573d1f89d97b3149 100644
--- a/net/quic/congestion_control/tcp_cubic_sender_bytes_test.cc
+++ b/net/quic/congestion_control/tcp_cubic_sender_bytes_test.cc
@@ -27,6 +27,7 @@ namespace test {
// an initial CWND of 10. They have carefully calculated values which should be
// updated to be based on kInitialCongestionWindow.
const uint32_t kInitialCongestionWindowPackets = 10;
+const uint32_t kMaxCongestionWindowPackets = 200;
const uint32_t kDefaultWindowTCP =
kInitialCongestionWindowPackets * kDefaultTCPMSS;
const float kRenoBeta = 0.7f; // Reno backoff factor.
@@ -38,7 +39,7 @@ class TcpCubicSenderBytesPeer : public TcpCubicSenderBytes {
&rtt_stats_,
reno,
kInitialCongestionWindowPackets,
- kMaxCongestionWindow,
+ kMaxCongestionWindowPackets,
&stats_) {}
const HybridSlowStart& hybrid_slow_start() const {
@@ -732,9 +733,9 @@ TEST_F(TcpCubicSenderBytesTest, BandwidthResumption) {
// Resumed CWND is limited to be in a sensible range.
cached_network_params.set_bandwidth_estimate_bytes_per_second(
- (kMaxCongestionWindow + 1) * kDefaultTCPMSS);
+ (kMaxCongestionWindowPackets + 1) * kDefaultTCPMSS);
sender_->ResumeConnectionState(cached_network_params, false);
- EXPECT_EQ(kMaxCongestionWindow * kDefaultTCPMSS,
+ EXPECT_EQ(kMaxCongestionWindowPackets * kDefaultTCPMSS,
sender_->GetCongestionWindow());
if (FLAGS_quic_no_lower_bw_resumption_limit) {
@@ -752,9 +753,9 @@ TEST_F(TcpCubicSenderBytesTest, BandwidthResumption) {
// Resume to the max value.
cached_network_params.set_max_bandwidth_estimate_bytes_per_second(
- kMaxCongestionWindow * kDefaultTCPMSS);
+ kMaxCongestionWindowPackets * kDefaultTCPMSS);
sender_->ResumeConnectionState(cached_network_params, true);
- EXPECT_EQ(kMaxCongestionWindow * kDefaultTCPMSS,
+ EXPECT_EQ(kMaxCongestionWindowPackets * kDefaultTCPMSS,
sender_->GetCongestionWindow());
}
@@ -805,7 +806,7 @@ TEST_F(TcpCubicSenderBytesTest, ResetAfterConnectionMigration) {
// Resets cwnd and slow start threshold on connection migrations.
sender_->OnConnectionMigration();
EXPECT_EQ(kDefaultWindowTCP, sender_->GetCongestionWindow());
- EXPECT_EQ(kMaxCongestionWindow * kDefaultTCPMSS,
+ EXPECT_EQ(kMaxCongestionWindowPackets * kDefaultTCPMSS,
sender_->GetSlowStartThreshold());
EXPECT_FALSE(sender_->hybrid_slow_start().started());
}
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender_bytes.cc ('k') | net/quic/congestion_control/tcp_cubic_sender_packets.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698