Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Unified Diff: net/quic/quic_sent_packet_manager_test.cc

Issue 284273002: Fix a QUIC bug where a crypto packet was never removed from the (Closed) Base URL: https://chromium.googlesource.com/chromium/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_sent_packet_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_sent_packet_manager_test.cc
diff --git a/net/quic/quic_sent_packet_manager_test.cc b/net/quic/quic_sent_packet_manager_test.cc
index 900573bdef3eabc8ed98ee25e1439e123c7f2253..3e040778d6ef0ff7168f82be04a0c935e193f5b2 100644
--- a/net/quic/quic_sent_packet_manager_test.cc
+++ b/net/quic/quic_sent_packet_manager_test.cc
@@ -992,10 +992,14 @@ TEST_F(QuicSentPacketManagerTest,
manager_.OnRetransmissionTimeout();
RetransmitNextPacket(2);
+ // Retransmit the crypto packet as 3.
+ manager_.OnRetransmissionTimeout();
+ RetransmitNextPacket(3);
+
// Now neuter all unacked unencrypted packets, which occurs when the
// connection goes forward secure.
manager_.NeuterUnencryptedPackets();
- QuicPacketSequenceNumber unacked[] = { 1, 2 };
+ QuicPacketSequenceNumber unacked[] = { 1, 2, 3};
VerifyUnackedPackets(unacked, arraysize(unacked));
VerifyRetransmittablePackets(NULL, 0);
EXPECT_FALSE(manager_.HasPendingRetransmissions());
@@ -1004,9 +1008,10 @@ TEST_F(QuicSentPacketManagerTest,
// Ensure both packets get discarded when packet 2 is acked.
ReceivedPacketInfo received_info;
- received_info.largest_observed = 2;
+ received_info.largest_observed = 3;
received_info.missing_packets.insert(1);
- ExpectUpdatedRtt(2);
+ received_info.missing_packets.insert(2);
+ ExpectUpdatedRtt(3);
manager_.OnIncomingAck(received_info, clock_.ApproximateNow());
VerifyUnackedPackets(NULL, 0);
VerifyRetransmittablePackets(NULL, 0);
« no previous file with comments | « net/quic/quic_sent_packet_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698