| 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/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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |