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

Side by Side Diff: net/quic/quic_sent_packet_manager_test.cc

Issue 731863007: Changes QUIC's SentPacketManager to pass in HAS_RETRANSMITTABLE_DATA to (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Record_last_packet_send_time_80138676
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « net/quic/quic_sent_packet_manager.cc ('k') | net/quic/quic_unacked_packet_map.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "net/quic/quic_sent_packet_manager.h" 5 #include "net/quic/quic_sent_packet_manager.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "net/quic/quic_flags.h" 8 #include "net/quic/quic_flags.h"
9 #include "net/quic/test_tools/quic_config_peer.h" 9 #include "net/quic/test_tools/quic_config_peer.h"
10 #include "net/quic/test_tools/quic_sent_packet_manager_peer.h" 10 #include "net/quic/test_tools/quic_sent_packet_manager_peer.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 new QuicStreamFrame(1, false, 0, IOVector())); 207 new QuicStreamFrame(1, false, 0, IOVector()));
208 packet.retransmittable_frames->set_encryption_level(ENCRYPTION_NONE); 208 packet.retransmittable_frames->set_encryption_level(ENCRYPTION_NONE);
209 manager_.OnPacketSent(&packet, 0, clock_.Now(), 209 manager_.OnPacketSent(&packet, 0, clock_.Now(),
210 packet.packet->length(), NOT_RETRANSMISSION, 210 packet.packet->length(), NOT_RETRANSMISSION,
211 HAS_RETRANSMITTABLE_DATA); 211 HAS_RETRANSMITTABLE_DATA);
212 } 212 }
213 213
214 void SendFecPacket(QuicPacketSequenceNumber sequence_number) { 214 void SendFecPacket(QuicPacketSequenceNumber sequence_number) {
215 EXPECT_CALL(*send_algorithm_, 215 EXPECT_CALL(*send_algorithm_,
216 OnPacketSent(_, BytesInFlight(), sequence_number, 216 OnPacketSent(_, BytesInFlight(), sequence_number,
217 kDefaultLength, NO_RETRANSMITTABLE_DATA)) 217 kDefaultLength, HAS_RETRANSMITTABLE_DATA))
218 .Times(1).WillOnce(Return(true)); 218 .Times(1).WillOnce(Return(true));
219 SerializedPacket packet(CreateFecPacket(sequence_number)); 219 SerializedPacket packet(CreateFecPacket(sequence_number));
220 manager_.OnPacketSent(&packet, 0, clock_.Now(), 220 manager_.OnPacketSent(&packet, 0, clock_.Now(),
221 packet.packet->length(), NOT_RETRANSMISSION, 221 packet.packet->length(), NOT_RETRANSMISSION,
222 NO_RETRANSMITTABLE_DATA); 222 NO_RETRANSMITTABLE_DATA);
223 } 223 }
224 224
225 void SendAckPacket(QuicPacketSequenceNumber sequence_number) { 225 void SendAckPacket(QuicPacketSequenceNumber sequence_number) {
226 EXPECT_CALL(*send_algorithm_, 226 EXPECT_CALL(*send_algorithm_,
227 OnPacketSent(_, BytesInFlight(), sequence_number, 227 OnPacketSent(_, BytesInFlight(), sequence_number,
(...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after
1447 EXPECT_CALL(*network_change_visitor_, OnCongestionWindowChange()); 1447 EXPECT_CALL(*network_change_visitor_, OnCongestionWindowChange());
1448 manager_.SetFromConfig(config); 1448 manager_.SetFromConfig(config);
1449 1449
1450 EXPECT_EQ(0, manager_.GetRttStats()->smoothed_rtt().ToMicroseconds()); 1450 EXPECT_EQ(0, manager_.GetRttStats()->smoothed_rtt().ToMicroseconds());
1451 EXPECT_EQ(initial_rtt_us, manager_.GetRttStats()->initial_rtt_us()); 1451 EXPECT_EQ(initial_rtt_us, manager_.GetRttStats()->initial_rtt_us());
1452 } 1452 }
1453 1453
1454 } // namespace 1454 } // namespace
1455 } // namespace test 1455 } // namespace test
1456 } // namespace net 1456 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_sent_packet_manager.cc ('k') | net/quic/quic_unacked_packet_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698