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

Unified Diff: net/quic/quic_unacked_packet_map_test.cc

Issue 554993002: Fix a crash bug in QuicUnackedPacketMap when truncated acks arrived. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@send_an_ack_74741188
Patch Set: Created 6 years, 3 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_unacked_packet_map.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_unacked_packet_map_test.cc
diff --git a/net/quic/quic_unacked_packet_map_test.cc b/net/quic/quic_unacked_packet_map_test.cc
index 16d1df2bcde22953a6e00146448f5e3d22a35223..0a7bb2b490ea43801f7997e3fe187050becbbf5f 100644
--- a/net/quic/quic_unacked_packet_map_test.cc
+++ b/net/quic/quic_unacked_packet_map_test.cc
@@ -234,6 +234,19 @@ TEST_F(QuicUnackedPacketMapTest, RetransmitThreeTimes) {
VerifyInFlightPackets(pending4, arraysize(pending4));
QuicPacketSequenceNumber retransmittable4[] = { 7 };
VerifyRetransmittablePackets(retransmittable4, arraysize(retransmittable4));
+
+ // Remove the older two transmissions from in flight.
+ unacked_packets_.RemoveFromInFlight(3);
+ unacked_packets_.RemoveFromInFlight(5);
+ QuicPacketSequenceNumber pending5[] = { 7 };
+ VerifyInFlightPackets(pending5, arraysize(pending5));
+
+ // Now test ClearPreviousTransmissions.
+ unacked_packets_.ClearPreviousRetransmissions(5);
+ QuicPacketSequenceNumber unacked5[] = { 7 };
+ VerifyUnackedPackets(unacked5, arraysize(unacked5));
+ QuicPacketSequenceNumber retransmittable5[] = { 7 };
+ VerifyRetransmittablePackets(retransmittable5, arraysize(retransmittable5));
}
} // namespace
« no previous file with comments | « net/quic/quic_unacked_packet_map.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698