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

Unified Diff: net/quic/quic_sent_packet_manager_test.cc

Issue 572703003: Minor change to QUIC's retransmission to not link old retransmissions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@merge_75263809
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_sent_packet_manager.cc ('k') | net/quic/quic_session.cc » ('j') | 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 09720606ab9b5b1ea5f9270bcdeb811961fb49ac..6b33f45661fc34c5bba6712b7d2c6e7d865aff20 100644
--- a/net/quic/quic_sent_packet_manager_test.cc
+++ b/net/quic/quic_sent_packet_manager_test.cc
@@ -975,7 +975,7 @@ TEST_F(QuicSentPacketManagerTest, CryptoHandshakeTimeoutVersionNegotiation) {
// Now act like a version negotiation packet arrived, which would cause all
// unacked packets to be retransmitted.
- manager_.RetransmitUnackedPackets(ALL_PACKETS);
+ manager_.RetransmitUnackedPackets(ALL_UNACKED_RETRANSMISSION);
// Ensure the first two pending packets are the crypto retransmits.
ASSERT_TRUE(manager_.HasPendingRetransmissions());
@@ -985,6 +985,13 @@ TEST_F(QuicSentPacketManagerTest, CryptoHandshakeTimeoutVersionNegotiation) {
RetransmitNextPacket(9);
EXPECT_TRUE(manager_.HasPendingRetransmissions());
+ // Send 3 more data packets and ensure the least unacked is raised.
+ RetransmitNextPacket(10);
+ RetransmitNextPacket(11);
+ RetransmitNextPacket(12);
+ EXPECT_FALSE(manager_.HasPendingRetransmissions());
+
+ EXPECT_EQ(8u, manager_.GetLeastUnacked());
}
TEST_F(QuicSentPacketManagerTest, CryptoHandshakeSpuriousRetransmission) {
@@ -1043,7 +1050,7 @@ TEST_F(QuicSentPacketManagerTest,
// Now retransmit all the unacked packets, which occurs when there is a
// version negotiation.
- manager_.RetransmitUnackedPackets(ALL_PACKETS);
+ manager_.RetransmitUnackedPackets(ALL_UNACKED_RETRANSMISSION);
QuicPacketSequenceNumber unacked[] = { 1, 2 };
VerifyUnackedPackets(unacked, arraysize(unacked));
EXPECT_TRUE(manager_.HasPendingRetransmissions());
« no previous file with comments | « net/quic/quic_sent_packet_manager.cc ('k') | net/quic/quic_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698