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

Side by Side Diff: net/quic/congestion_control/tcp_loss_algorithm_test.cc

Issue 280753002: Revert of Minor QUIC cleanup to combine QuicUnackedPacketMap's (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | net/quic/quic_sent_packet_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <algorithm> 5 #include <algorithm>
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "net/quic/congestion_control/rtt_stats.h" 9 #include "net/quic/congestion_control/rtt_stats.h"
10 #include "net/quic/congestion_control/tcp_loss_algorithm.h" 10 #include "net/quic/congestion_control/tcp_loss_algorithm.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 TEST_F(TcpLossAlgorithmTest, DontEarlyRetransmitNeuteredPacket) { 165 TEST_F(TcpLossAlgorithmTest, DontEarlyRetransmitNeuteredPacket) {
166 const size_t kNumSentPackets = 2; 166 const size_t kNumSentPackets = 2;
167 // Transmit 2 packets. 167 // Transmit 2 packets.
168 for (size_t i = 1; i <= kNumSentPackets; ++i) { 168 for (size_t i = 1; i <= kNumSentPackets; ++i) {
169 SendDataPacket(i); 169 SendDataPacket(i);
170 } 170 }
171 // Early retransmit when the final packet gets acked and the first is nacked. 171 // Early retransmit when the final packet gets acked and the first is nacked.
172 unacked_packets_.SetNotPending(2); 172 unacked_packets_.SetNotPending(2);
173 unacked_packets_.NackPacket(1, 1); 173 unacked_packets_.NackPacket(1, 1);
174 unacked_packets_.NeuterIfPendingOrRemovePacket(1); 174 unacked_packets_.NeuterPacket(1);
175 VerifyLosses(2, NULL, 0); 175 VerifyLosses(2, NULL, 0);
176 EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout()); 176 EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
177 } 177 }
178 178
179 } // namespace test 179 } // namespace test
180 } // namespace net 180 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_sent_packet_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698