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

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

Issue 2229393003: net: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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
« no previous file with comments | « net/quic/core/quic_sent_packet_manager.cc ('k') | net/quic/core/quic_session.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/core/quic_sent_packet_manager.h" 5 #include "net/quic/core/quic_sent_packet_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "net/quic/core/quic_flags.h" 10 #include "net/quic/core/quic_flags.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 .Times(AnyNumber()); 99 .Times(AnyNumber());
100 EXPECT_CALL(*send_algorithm_, BandwidthEstimate()) 100 EXPECT_CALL(*send_algorithm_, BandwidthEstimate())
101 .Times(AnyNumber()) 101 .Times(AnyNumber())
102 .WillRepeatedly(Return(QuicBandwidth::Zero())); 102 .WillRepeatedly(Return(QuicBandwidth::Zero()));
103 EXPECT_CALL(*send_algorithm_, InSlowStart()).Times(AnyNumber()); 103 EXPECT_CALL(*send_algorithm_, InSlowStart()).Times(AnyNumber());
104 EXPECT_CALL(*send_algorithm_, InRecovery()).Times(AnyNumber()); 104 EXPECT_CALL(*send_algorithm_, InRecovery()).Times(AnyNumber());
105 EXPECT_CALL(*network_change_visitor_, OnPathMtuIncreased(1000)) 105 EXPECT_CALL(*network_change_visitor_, OnPathMtuIncreased(1000))
106 .Times(AnyNumber()); 106 .Times(AnyNumber());
107 } 107 }
108 108
109 ~QuicSentPacketManagerTest() override { 109 ~QuicSentPacketManagerTest() override { base::STLDeleteElements(&packets_); }
110 STLDeleteElements(&packets_);
111 }
112 110
113 QuicByteCount BytesInFlight() { 111 QuicByteCount BytesInFlight() {
114 return QuicSentPacketManagerPeer::GetBytesInFlight(&manager_); 112 return QuicSentPacketManagerPeer::GetBytesInFlight(&manager_);
115 } 113 }
116 void VerifyUnackedPackets(QuicPacketNumber* packets, size_t num_packets) { 114 void VerifyUnackedPackets(QuicPacketNumber* packets, size_t num_packets) {
117 if (num_packets == 0) { 115 if (num_packets == 0) {
118 EXPECT_FALSE(manager_.HasUnackedPackets()); 116 EXPECT_FALSE(manager_.HasUnackedPackets());
119 EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetNumRetransmittablePackets( 117 EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetNumRetransmittablePackets(
120 &manager_)); 118 &manager_));
121 return; 119 return;
(...skipping 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after
1710 ExpectAck(1); 1708 ExpectAck(1);
1711 EXPECT_CALL(*network_change_visitor_, 1709 EXPECT_CALL(*network_change_visitor_,
1712 OnPathMtuIncreased(kDefaultLength + 100)); 1710 OnPathMtuIncreased(kDefaultLength + 100));
1713 QuicAckFrame ack_frame = InitAckFrame(1); 1711 QuicAckFrame ack_frame = InitAckFrame(1);
1714 manager_.OnIncomingAck(ack_frame, clock_.Now()); 1712 manager_.OnIncomingAck(ack_frame, clock_.Now());
1715 } 1713 }
1716 1714
1717 } // namespace 1715 } // namespace
1718 } // namespace test 1716 } // namespace test
1719 } // namespace net 1717 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_sent_packet_manager.cc ('k') | net/quic/core/quic_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698