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 731b8f51ebaae5b37de4fc98706b1b41a661c6dc..9193941052ff14e8672ff3d4c28323dd35e8aaf8 100644 |
--- a/net/quic/congestion_control/tcp_cubic_sender_test.cc |
+++ b/net/quic/congestion_control/tcp_cubic_sender_test.cc |
@@ -25,22 +25,22 @@ const int64 kInitialCongestionWindow = 10; |
const uint32 kDefaultWindowTCP = kInitialCongestionWindow * kDefaultTCPMSS; |
// TODO(ianswett): Remove 10000 once b/10075719 is fixed. |
-const QuicTcpCongestionWindow kDefaultMaxCongestionWindowTCP = 10000; |
+const QuicPacketCount kDefaultMaxCongestionWindowTCP = 10000; |
class TcpCubicSenderPeer : public TcpCubicSender { |
public: |
TcpCubicSenderPeer(const QuicClock* clock, |
bool reno, |
- QuicTcpCongestionWindow max_tcp_congestion_window) |
+ QuicPacketCount max_tcp_congestion_window) |
: TcpCubicSender( |
clock, &rtt_stats_, reno, max_tcp_congestion_window, &stats_) { |
} |
- QuicTcpCongestionWindow congestion_window() { |
+ QuicPacketCount congestion_window() { |
return congestion_window_; |
} |
- QuicTcpCongestionWindow slowstart_threshold() { |
+ QuicPacketCount slowstart_threshold() { |
return slowstart_threshold_; |
} |
@@ -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) { |
@@ -489,7 +487,7 @@ TEST_F(TcpCubicSenderTest, RetransmissionDelay) { |
} |
TEST_F(TcpCubicSenderTest, SlowStartMaxSendWindow) { |
- const QuicTcpCongestionWindow kMaxCongestionWindowTCP = 50; |
+ const QuicPacketCount kMaxCongestionWindowTCP = 50; |
const int kNumberOfAcks = 100; |
sender_.reset( |
new TcpCubicSenderPeer(&clock_, false, kMaxCongestionWindowTCP)); |
@@ -505,7 +503,7 @@ TEST_F(TcpCubicSenderTest, SlowStartMaxSendWindow) { |
} |
TEST_F(TcpCubicSenderTest, TcpRenoMaxCongestionWindow) { |
- const QuicTcpCongestionWindow kMaxCongestionWindowTCP = 50; |
+ const QuicPacketCount kMaxCongestionWindowTCP = 50; |
const int kNumberOfAcks = 1000; |
sender_.reset( |
new TcpCubicSenderPeer(&clock_, true, kMaxCongestionWindowTCP)); |
@@ -527,7 +525,7 @@ TEST_F(TcpCubicSenderTest, TcpRenoMaxCongestionWindow) { |
} |
TEST_F(TcpCubicSenderTest, TcpCubicMaxCongestionWindow) { |
- const QuicTcpCongestionWindow kMaxCongestionWindowTCP = 50; |
+ const QuicPacketCount kMaxCongestionWindowTCP = 50; |
// Set to 10000 to compensate for small cubic alpha. |
const int kNumberOfAcks = 10000; |
@@ -579,7 +577,7 @@ TEST_F(TcpCubicSenderTest, DontTrackAckPackets) { |
} |
TEST_F(TcpCubicSenderTest, ConfigureMaxInitialWindow) { |
- QuicTcpCongestionWindow congestion_window = sender_->congestion_window(); |
+ QuicPacketCount congestion_window = sender_->congestion_window(); |
QuicConfig config; |
QuicConfigPeer::SetReceivedInitialWindow(&config, 2 * congestion_window); |