| Index: net/quic/quic_connection_test.cc
|
| diff --git a/net/quic/quic_connection_test.cc b/net/quic/quic_connection_test.cc
|
| index b3b661aae023e629565e280418a90aaf532eee8c..ff50b01010615909a57b43f97e0e5b34e2cf678b 100644
|
| --- a/net/quic/quic_connection_test.cc
|
| +++ b/net/quic/quic_connection_test.cc
|
| @@ -2224,6 +2224,27 @@ TEST_P(QuicConnectionTest, ReviveMissingPacketAfterDataPackets) {
|
| EXPECT_NE(0u, QuicConnectionPeer::ReceivedEntropyHash(&connection_, 3));
|
| }
|
|
|
| +TEST_P(QuicConnectionTest, TLP) {
|
| + QuicSentPacketManagerPeer::SetMaxTailLossProbes(
|
| + QuicConnectionPeer::GetSentPacketManager(&connection_), 1);
|
| +
|
| + SendStreamDataToPeer(3, "foo", 0, !kFin, NULL);
|
| + EXPECT_EQ(1u, outgoing_ack()->sent_info.least_unacked);
|
| + QuicTime retransmission_time =
|
| + connection_.GetRetransmissionAlarm()->deadline();
|
| + EXPECT_NE(QuicTime::Zero(), retransmission_time);
|
| +
|
| + EXPECT_EQ(1u, writer_->header().packet_sequence_number);
|
| + // Simulate the retransmission alarm firing and sending a tlp,
|
| + // so send algorithm's OnRetransmissionTimeout is not called.
|
| + clock_.AdvanceTime(retransmission_time.Subtract(clock_.Now()));
|
| + EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, 2u, _, _));
|
| + connection_.GetRetransmissionAlarm()->Fire();
|
| + EXPECT_EQ(2u, writer_->header().packet_sequence_number);
|
| + // We do not raise the high water mark yet.
|
| + EXPECT_EQ(1u, outgoing_ack()->sent_info.least_unacked);
|
| +}
|
| +
|
| TEST_P(QuicConnectionTest, RTO) {
|
| QuicTime default_retransmission_time = clock_.ApproximateNow().Add(
|
| DefaultRetransmissionTime());
|
|
|