| 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 f6afdc8122852f3143930d9ba6ed9824cb87ae2a..c01e0c7498eaed0ec6c95bdf4e3a5eb4c6b1e259 100644
|
| --- a/net/quic/congestion_control/tcp_cubic_sender_test.cc
|
| +++ b/net/quic/congestion_control/tcp_cubic_sender_test.cc
|
| @@ -21,7 +21,8 @@ using std::min;
|
| namespace net {
|
| namespace test {
|
|
|
| -const uint32 kDefaultWindowTCP = 10 * kDefaultTCPMSS;
|
| +const int64 kInitialCongestionWindow = 10;
|
| +const uint32 kDefaultWindowTCP = kInitialCongestionWindow * kDefaultTCPMSS;
|
|
|
| // TODO(ianswett): Remove 10000 once b/10075719 is fixed.
|
| const QuicTcpCongestionWindow kDefaultMaxCongestionWindowTCP = 10000;
|
| @@ -299,6 +300,19 @@ TEST_F(TcpCubicSenderTest, SlowStartPacketLoss) {
|
| EXPECT_FALSE(sender_->hybrid_slow_start().started());
|
| }
|
|
|
| +TEST_F(TcpCubicSenderTest, NoPRRWhenLessThanOnePacketInFlight) {
|
| + SendAvailableSendWindow();
|
| + LoseNPackets(kInitialCongestionWindow - 1);
|
| + AckNPackets(1);
|
| + // PRR will allow 2 packets for every ack during recovery.
|
| + EXPECT_EQ(2, SendAvailableSendWindow());
|
| + // Simulate abandoning all packets by supplying a bytes_in_flight of 0.
|
| + // PRR should now allow a packet to be sent, even though prr's state
|
| + // variables believe it has sent enough packets.
|
| + EXPECT_EQ(QuicTime::Delta::Zero(),
|
| + sender_->TimeUntilSend(clock_.Now(), 0, HAS_RETRANSMITTABLE_DATA));
|
| +}
|
| +
|
| TEST_F(TcpCubicSenderTest, SlowStartPacketLossPRR) {
|
| // Test based on the first example in RFC6937.
|
| // Ack 10 packets in 5 acks to raise the CWND to 20, as in the example.
|
|
|