src/net/third_party/quiche/src/quic/core/congestion_control/general_loss_algorithm_test.cc
TEST_F(GeneralLossAlgorithmTest, NackRetransmit1PacketSingleAck) {
  const size_t kNumSentPackets = 10;
  // Transmit 10 packets.
  for (size_t i = 1; i <= kNumSentPackets; ++i) {
    SendDataPacket(i);
  }
  AckedPacketVector packets_acked;
  // Nack the first packet 3 times in an AckFrame with three missing packets.
  unacked_packets_.RemoveFromInFlight(QuicPacketNumber(4));
  packets_acked.push_back(AckedPacket(
      QuicPacketNumber(4), kMaxOutgoingPacketSize, QuicTime::Zero()));
  VerifyLosses(4, packets_acked, {1});
  EXPECT_EQ(clock_.Now() + 1.25 * rtt_stats_.smoothed_rtt(),
            loss_algorithm_.GetLossTimeout());
}
// Ack a packet 3 packets ahead, causing a retransmit.
Ack a packet 3 packets ahead, causing a retransmit.
Ack a packet 3 packets ahead causing a retransmit .
TEST_F(GeneralLossAlgorithmTest, NackRetransmit1PacketSingleAck) {
  const size_t kNumSentPackets = 10;
  for (size_t i = 1; i <= kNumSentPackets; ++i) {
    SendDataPacket(i);
  }
  AckedPacketVector packets_acked;
  unacked_packets_.RemoveFromInFlight(QuicPacketNumber(4));
  packets_acked.push_back(AckedPacket(
      QuicPacketNumber(4), kMaxOutgoingPacketSize, QuicTime::Zero()));
  VerifyLosses(4, packets_acked, {1});
  EXPECT_EQ(clock_.Now() + 1.25 * rtt_stats_.smoothed_rtt(),
            loss_algorithm_.GetLossTimeout());
}
TEST_F ( GeneralLossAlgorithmTest , NackRetransmit1PacketSingleAck ) { const size_t kNumSentPackets = 10 ; for ( size_t i = 1 ; i <= kNumSentPackets ; ++ i ) { SendDataPacket ( i ) ; } AckedPacketVector packets_acked ; unacked_packets_ . RemoveFromInFlight ( QuicPacketNumber ( 4 ) ) ; packets_acked . push_back ( AckedPacket ( QuicPacketNumber ( 4 ) , kMaxOutgoingPacketSize , QuicTime :: Zero ( ) ) ) ; VerifyLosses ( 4 , packets_acked , { 1 } ) ; EXPECT_EQ ( clock_ . Now ( ) + 1.25 * rtt_stats_ . smoothed_rtt ( ) , loss_algorithm_ . GetLossTimeout ( ) ) ; }
Ack a packet 3 packets ahead, causing a retransmit.
Ack a packet 3 packets ahead causing a retransmit .
// Transmit 10 packets. // Nack the first packet 3 times in an AckFrame with three missing packets.