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

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

Issue 687093002: Move receive_window_ from BbrTcpSender and TcpCubicSender to (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Gathering_ClientConnectionStats_78688302
Patch Set: Created 6 years, 2 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/quic_connection_test.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 7cdd470880930074d2212ec66907de84199119cc..9193941052ff14e8672ff3d4c28323dd35e8aaf8 100644
--- a/net/quic/congestion_control/tcp_cubic_sender_test.cc
+++ b/net/quic/congestion_control/tcp_cubic_sender_test.cc
@@ -50,8 +50,6 @@ class TcpCubicSenderPeer : public TcpCubicSender {
RttStats rtt_stats_;
QuicConnectionStats stats_;
-
- using TcpCubicSender::SendWindow;
};
class TcpCubicSenderTest : public ::testing::Test {
@@ -172,7 +170,7 @@ TEST_F(TcpCubicSenderTest, ApplicationLimitedSlowStart) {
for (int i = 0; i < kNumberOfAcks; ++i) {
AckNPackets(2);
}
- QuicByteCount bytes_to_send = sender_->SendWindow();
+ QuicByteCount bytes_to_send = sender_->GetCongestionWindow();
// It's expected 2 acks will arrive when the bytes_in_flight are greater than
// half the CWND.
EXPECT_EQ(kDefaultWindowTCP + kDefaultTCPMSS * 2 * 2,
@@ -195,7 +193,7 @@ TEST_F(TcpCubicSenderTest, ExponentialSlowStart) {
SendAvailableSendWindow();
AckNPackets(2);
}
- QuicByteCount bytes_to_send = sender_->SendWindow();
+ QuicByteCount bytes_to_send = sender_->GetCongestionWindow();
EXPECT_EQ(kDefaultWindowTCP + kDefaultTCPMSS * 2 * kNumberOfAcks,
bytes_to_send);
}
@@ -428,28 +426,28 @@ TEST_F(TcpCubicSenderTest, SlowStartBurstPacketLossPRR) {
}
TEST_F(TcpCubicSenderTest, RTOCongestionWindowAndRevert) {
- EXPECT_EQ(kDefaultWindowTCP, sender_->SendWindow());
+ EXPECT_EQ(kDefaultWindowTCP, sender_->GetCongestionWindow());
EXPECT_EQ(10000u, sender_->slowstart_threshold());
// Expect the window to decrease to the minimum once the RTO fires
// and slow start threshold to be set to 1/2 of the CWND.
sender_->OnRetransmissionTimeout(true);
- EXPECT_EQ(2 * kDefaultTCPMSS, sender_->SendWindow());
+ EXPECT_EQ(2 * kDefaultTCPMSS, sender_->GetCongestionWindow());
EXPECT_EQ(5u, sender_->slowstart_threshold());
// Now repair the RTO and ensure the slowstart threshold reverts.
sender_->RevertRetransmissionTimeout();
- EXPECT_EQ(kDefaultWindowTCP, sender_->SendWindow());
+ EXPECT_EQ(kDefaultWindowTCP, sender_->GetCongestionWindow());
EXPECT_EQ(10000u, sender_->slowstart_threshold());
}
TEST_F(TcpCubicSenderTest, RTOCongestionWindowNoRetransmission) {
- EXPECT_EQ(kDefaultWindowTCP, sender_->SendWindow());
+ EXPECT_EQ(kDefaultWindowTCP, sender_->GetCongestionWindow());
// Expect the window to remain unchanged if the RTO fires but no
// packets are retransmitted.
sender_->OnRetransmissionTimeout(false);
- EXPECT_EQ(kDefaultWindowTCP, sender_->SendWindow());
+ EXPECT_EQ(kDefaultWindowTCP, sender_->GetCongestionWindow());
}
TEST_F(TcpCubicSenderTest, RetransmissionDelay) {
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender.cc ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698