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

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

Issue 851503003: Update from https://crrev.com/311076 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender.cc ('k') | net/quic/congestion_control/tcp_loss_algorithm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ebea8aeccaa40dbf961b20160e4b46d4568d4a0c..8df0ea8ebdb3749c1366bf58f4908b9414caeb79 100644
--- a/net/quic/congestion_control/tcp_cubic_sender_test.cc
+++ b/net/quic/congestion_control/tcp_cubic_sender_test.cc
@@ -450,6 +450,27 @@ TEST_F(TcpCubicSenderTest, RTOCongestionWindowNoRetransmission) {
EXPECT_EQ(kDefaultWindowTCP, sender_->GetCongestionWindow());
}
+TEST_F(TcpCubicSenderTest, RTOTwiceOnlyHalvesSsthresh) {
+ EXPECT_EQ(kDefaultWindowTCP, sender_->GetCongestionWindow());
+
+ sender_->OnRetransmissionTimeout(true);
+ EXPECT_EQ(2 * kDefaultTCPMSS, sender_->GetCongestionWindow());
+ EXPECT_EQ(5u, sender_->slowstart_threshold());
+
+ sender_->OnRetransmissionTimeout(true);
+ EXPECT_EQ(2 * kDefaultTCPMSS, sender_->GetCongestionWindow());
+ EXPECT_EQ(5u, sender_->slowstart_threshold());
+
+ AckNPackets(2);
+
+ EXPECT_EQ(4 * kDefaultTCPMSS, sender_->GetCongestionWindow());
+ EXPECT_EQ(5u, sender_->slowstart_threshold());
+
+ sender_->OnRetransmissionTimeout(true);
+ EXPECT_EQ(2 * kDefaultTCPMSS, sender_->GetCongestionWindow());
+ EXPECT_EQ(2u, sender_->slowstart_threshold());
+}
+
TEST_F(TcpCubicSenderTest, RetransmissionDelay) {
const int64 kRttMs = 10;
const int64 kDeviationMs = 3;
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender.cc ('k') | net/quic/congestion_control/tcp_loss_algorithm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698