| Index: net/quic/quic_connection_test.cc
|
| diff --git a/net/quic/quic_connection_test.cc b/net/quic/quic_connection_test.cc
|
| index 05aeeeb74e5572b547dd670655de531c83e28ee4..c35918bc0f918b64bbc5668eeb33448d860435ad 100644
|
| --- a/net/quic/quic_connection_test.cc
|
| +++ b/net/quic/quic_connection_test.cc
|
| @@ -918,8 +918,8 @@ TEST_F(QuicConnectionTest, TruncatedAck) {
|
| EXPECT_CALL(entropy_calculator_,
|
| EntropyHash(511)).WillOnce(testing::Return(0));
|
| EXPECT_CALL(*send_algorithm_, OnPacketAcked(_, _, _)).Times(256);
|
| - EXPECT_CALL(*send_algorithm_, OnPacketLost(_, _)).Times(10);
|
| - EXPECT_CALL(*send_algorithm_, OnPacketAbandoned(_, _)).Times(10);
|
| + EXPECT_CALL(*send_algorithm_, OnPacketLost(_, _)).Times(2);
|
| + EXPECT_CALL(*send_algorithm_, OnPacketAbandoned(_, _)).Times(2);
|
| ProcessAckPacket(&frame);
|
|
|
| QuicReceivedPacketManager* received_packet_manager =
|
| @@ -933,8 +933,8 @@ TEST_F(QuicConnectionTest, TruncatedAck) {
|
|
|
| // Removing one missing packet allows us to ack 192 and one more range.
|
| EXPECT_CALL(*send_algorithm_, OnPacketAcked(_, _, _)).Times(2);
|
| - EXPECT_CALL(*send_algorithm_, OnPacketLost(_, _)).Times(10);
|
| - EXPECT_CALL(*send_algorithm_, OnPacketAbandoned(_, _)).Times(10);
|
| + EXPECT_CALL(*send_algorithm_, OnPacketLost(_, _)).Times(2);
|
| + EXPECT_CALL(*send_algorithm_, OnPacketAbandoned(_, _)).Times(2);
|
| ProcessAckPacket(&frame);
|
| EXPECT_EQ(num_packets,
|
| received_packet_manager->peer_largest_observed_packet());
|
| @@ -1788,7 +1788,7 @@ TEST_F(QuicConnectionTest, ResumptionAlarmThenWriteBlocked) {
|
| TEST_F(QuicConnectionTest, LimitPacketsPerNack) {
|
| EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
|
| EXPECT_CALL(*send_algorithm_, OnPacketAcked(15, _, _)).Times(1);
|
| - EXPECT_CALL(*send_algorithm_, OnPacketAbandoned(_, _)).Times(13);
|
| + EXPECT_CALL(*send_algorithm_, OnPacketAbandoned(_, _)).Times(4);
|
| int offset = 0;
|
| // Send packets 1 to 15.
|
| for (int i = 0; i < 15; ++i) {
|
| @@ -1806,15 +1806,14 @@ TEST_F(QuicConnectionTest, LimitPacketsPerNack) {
|
| QuicConnectionPeer::GetSentEntropyHash(&connection_, 15) ^
|
| QuicConnectionPeer::GetSentEntropyHash(&connection_, 14);
|
|
|
| - // 13 packets have been NACK'd 3 times, but we limit retransmissions to 10.
|
| - EXPECT_CALL(*send_algorithm_, OnPacketLost(_, _)).Times(10);
|
| - EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(10);
|
| + // 13 packets have been NACK'd 3 times, but we limit retransmissions to 2.
|
| + EXPECT_CALL(*send_algorithm_, OnPacketLost(_, _)).Times(2);
|
| + EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(2);
|
| ProcessAckPacket(&nack);
|
|
|
| - // The next call should trigger retransmitting 3 more packets, because 14
|
| - // only has 2 nacks so far.
|
| - EXPECT_CALL(*send_algorithm_, OnPacketLost(_, _)).Times(3);
|
| - EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(3);
|
| + // The next call should trigger retransmitting 2 more packets.
|
| + EXPECT_CALL(*send_algorithm_, OnPacketLost(_, _)).Times(2);
|
| + EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(2);
|
| ProcessAckPacket(&nack);
|
| }
|
|
|
|
|