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

Unified Diff: net/quic/quic_sent_packet_manager_test.cc

Issue 306573002: Add an IncreaseLargestObserved to QuicUnackedPacketMap to remove the rtt (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/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') | net/quic/quic_unacked_packet_map.h » ('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 838da404b9e27b03b081a17d9180fc5728ce2ab7..b3c1fdcbbb91155a3039bf39dee56101502ecf77 100644
--- a/net/quic/quic_sent_packet_manager_test.cc
+++ b/net/quic/quic_sent_packet_manager_test.cc
@@ -321,8 +321,9 @@ TEST_F(QuicSentPacketManagerTest, RetransmitThenAckPrevious) {
received_info.largest_observed = 1;
manager_.OnIncomingAck(received_info, clock_.ApproximateNow());
- // No packets should be unacked.
- VerifyUnackedPackets(NULL, 0);
+ // 2 should be unacked, since it may provide an RTT measurement.
+ QuicPacketSequenceNumber unacked[] = { 2 };
+ VerifyUnackedPackets(unacked, arraysize(unacked));
EXPECT_FALSE(QuicSentPacketManagerPeer::HasPendingPackets(&manager_));
VerifyRetransmittablePackets(NULL, 0);
@@ -415,8 +416,9 @@ TEST_F(QuicSentPacketManagerTest, RetransmitTwiceThenAckPreviousBeforeSend) {
ExpectUpdatedRtt(1);
manager_.OnIncomingAck(received_info, clock_.ApproximateNow());
- // Since 2 was marked for retransmit, when 1 is acked, 2 is discarded.
- VerifyUnackedPackets(NULL, 0);
+ // Since 2 was marked for retransmit, when 1 is acked, 2 is kept for RTT.
+ QuicPacketSequenceNumber unacked[] = { 2 };
+ VerifyUnackedPackets(unacked, arraysize(unacked));
EXPECT_FALSE(QuicSentPacketManagerPeer::HasPendingPackets(&manager_));
VerifyRetransmittablePackets(NULL, 0);
@@ -917,8 +919,8 @@ TEST_F(QuicSentPacketManagerTest, CryptoHandshakeSpuriousRetransmission) {
manager_.OnRetransmissionTimeout();
RetransmitNextPacket(3);
- // Now ack the first crypto packet, and ensure the second gets abandoned and
- // removed from unacked_packets.
+ // Now ack the second crypto packet, and ensure the first gets removed, but
+ // the third does not.
ExpectUpdatedRtt(2);
ReceivedPacketInfo received_info;
received_info.largest_observed = 2;
@@ -926,7 +928,8 @@ TEST_F(QuicSentPacketManagerTest, CryptoHandshakeSpuriousRetransmission) {
manager_.OnIncomingAck(received_info, clock_.ApproximateNow());
EXPECT_FALSE(QuicSentPacketManagerPeer::HasUnackedCryptoPackets(&manager_));
- VerifyUnackedPackets(NULL, 0);
+ QuicPacketSequenceNumber unacked[] = { 3 };
+ VerifyUnackedPackets(unacked, arraysize(unacked));
}
TEST_F(QuicSentPacketManagerTest, CryptoHandshakeTimeoutUnsentDataPacket) {
« no previous file with comments | « net/quic/quic_sent_packet_manager.cc ('k') | net/quic/quic_unacked_packet_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698