OLD | NEW |
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 EXPECT_CALL(*send_algorithm_, HasReliableBandwidthEstimate()) | 57 EXPECT_CALL(*send_algorithm_, HasReliableBandwidthEstimate()) |
58 .Times(AnyNumber()); | 58 .Times(AnyNumber()); |
59 EXPECT_CALL(*send_algorithm_, BandwidthEstimate()) | 59 EXPECT_CALL(*send_algorithm_, BandwidthEstimate()) |
60 .Times(AnyNumber()) | 60 .Times(AnyNumber()) |
61 .WillRepeatedly(Return(QuicBandwidth::Zero())); | 61 .WillRepeatedly(Return(QuicBandwidth::Zero())); |
62 EXPECT_CALL(*send_algorithm_, InSlowStart()).Times(AnyNumber()); | 62 EXPECT_CALL(*send_algorithm_, InSlowStart()).Times(AnyNumber()); |
63 EXPECT_CALL(*send_algorithm_, InRecovery()).Times(AnyNumber()); | 63 EXPECT_CALL(*send_algorithm_, InRecovery()).Times(AnyNumber()); |
64 } | 64 } |
65 | 65 |
66 virtual ~QuicSentPacketManagerTest() OVERRIDE { | 66 virtual ~QuicSentPacketManagerTest() override { |
67 STLDeleteElements(&packets_); | 67 STLDeleteElements(&packets_); |
68 } | 68 } |
69 | 69 |
70 QuicByteCount BytesInFlight() { | 70 QuicByteCount BytesInFlight() { |
71 return QuicSentPacketManagerPeer::GetBytesInFlight(&manager_); | 71 return QuicSentPacketManagerPeer::GetBytesInFlight(&manager_); |
72 } | 72 } |
73 void VerifyUnackedPackets(QuicPacketSequenceNumber* packets, | 73 void VerifyUnackedPackets(QuicPacketSequenceNumber* packets, |
74 size_t num_packets) { | 74 size_t num_packets) { |
75 if (num_packets == 0) { | 75 if (num_packets == 0) { |
76 EXPECT_FALSE(manager_.HasUnackedPackets()); | 76 EXPECT_FALSE(manager_.HasUnackedPackets()); |
(...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1381 .WillOnce(Return(100 * kDefaultTCPMSS)); | 1381 .WillOnce(Return(100 * kDefaultTCPMSS)); |
1382 manager_.SetFromConfig(config); | 1382 manager_.SetFromConfig(config); |
1383 | 1383 |
1384 EXPECT_EQ(initial_rtt_us, | 1384 EXPECT_EQ(initial_rtt_us, |
1385 manager_.GetRttStats()->SmoothedRtt().ToMicroseconds()); | 1385 manager_.GetRttStats()->SmoothedRtt().ToMicroseconds()); |
1386 } | 1386 } |
1387 | 1387 |
1388 } // namespace | 1388 } // namespace |
1389 } // namespace test | 1389 } // namespace test |
1390 } // namespace net | 1390 } // namespace net |
OLD | NEW |