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

Unified Diff: net/quic/congestion_control/tcp_loss_algorithm_test.cc

Issue 302783003: Rename QUIC's TransmissionInfo pending to in_flight and the associated (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
Index: net/quic/congestion_control/tcp_loss_algorithm_test.cc
diff --git a/net/quic/congestion_control/tcp_loss_algorithm_test.cc b/net/quic/congestion_control/tcp_loss_algorithm_test.cc
index f4e3d5ec3d7541d3ef05c9e7ee38bf32259b4f8d..eccda4a81c5fcb58f6e52c5ac04ce8aac9ac98cd 100644
--- a/net/quic/congestion_control/tcp_loss_algorithm_test.cc
+++ b/net/quic/congestion_control/tcp_loss_algorithm_test.cc
@@ -56,15 +56,15 @@ TEST_F(TcpLossAlgorithmTest, NackRetransmit1Packet) {
SendDataPacket(i);
}
// No loss on one ack.
- unacked_packets_.SetNotPending(2);
+ unacked_packets_.RemoveFromInFlight(2);
unacked_packets_.NackPacket(1, 1);
VerifyLosses(2, NULL, 0);
// No loss on two acks.
- unacked_packets_.SetNotPending(3);
+ unacked_packets_.RemoveFromInFlight(3);
unacked_packets_.NackPacket(1, 2);
VerifyLosses(3, NULL, 0);
// Loss on three acks.
- unacked_packets_.SetNotPending(4);
+ unacked_packets_.RemoveFromInFlight(4);
unacked_packets_.NackPacket(1, 3);
QuicPacketSequenceNumber lost[] = { 1 };
VerifyLosses(4, lost, arraysize(lost));
@@ -82,9 +82,9 @@ TEST_F(TcpLossAlgorithmTest, NackRetransmit1PacketWith1StretchAck) {
// Nack the first packet 3 times in a single StretchAck.
unacked_packets_.NackPacket(1, 3);
- unacked_packets_.SetNotPending(2);
- unacked_packets_.SetNotPending(3);
- unacked_packets_.SetNotPending(4);
+ unacked_packets_.RemoveFromInFlight(2);
+ unacked_packets_.RemoveFromInFlight(3);
+ unacked_packets_.RemoveFromInFlight(4);
QuicPacketSequenceNumber lost[] = { 1 };
VerifyLosses(4, lost, arraysize(lost));
EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
@@ -102,7 +102,7 @@ TEST_F(TcpLossAlgorithmTest, NackRetransmit1PacketSingleAck) {
unacked_packets_.NackPacket(1, 3);
unacked_packets_.NackPacket(2, 2);
unacked_packets_.NackPacket(3, 1);
- unacked_packets_.SetNotPending(4);
+ unacked_packets_.RemoveFromInFlight(4);
QuicPacketSequenceNumber lost[] = { 1 };
VerifyLosses(4, lost, arraysize(lost));
EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
@@ -115,7 +115,7 @@ TEST_F(TcpLossAlgorithmTest, EarlyRetransmit1Packet) {
SendDataPacket(i);
}
// Early retransmit when the final packet gets acked and the first is nacked.
- unacked_packets_.SetNotPending(2);
+ unacked_packets_.RemoveFromInFlight(2);
unacked_packets_.NackPacket(1, 1);
VerifyLosses(2, NULL, 0);
EXPECT_EQ(clock_.Now().Add(rtt_stats_.SmoothedRtt().Multiply(1.25)),
@@ -139,7 +139,7 @@ TEST_F(TcpLossAlgorithmTest, EarlyRetransmitAllPackets) {
// Early retransmit when the final packet gets acked and 1.25 RTTs have
// elapsed since the packets were sent.
- unacked_packets_.SetNotPending(kNumSentPackets);
+ unacked_packets_.RemoveFromInFlight(kNumSentPackets);
// This simulates a single ack following multiple missing packets with FACK.
for (size_t i = 1; i < kNumSentPackets; ++i) {
unacked_packets_.NackPacket(i, kNumSentPackets - i);
@@ -173,7 +173,7 @@ TEST_F(TcpLossAlgorithmTest, DontEarlyRetransmitNeuteredPacket) {
// Early retransmit when the final packet gets acked and the first is nacked.
unacked_packets_.IncreaseLargestObserved(2);
- unacked_packets_.SetNotPending(2);
+ unacked_packets_.RemoveFromInFlight(2);
unacked_packets_.NackPacket(1, 1);
VerifyLosses(2, NULL, 0);
EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
« no previous file with comments | « net/quic/congestion_control/tcp_loss_algorithm.cc ('k') | net/quic/congestion_control/time_loss_algorithm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698