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 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 ExpectAck(4); | 557 ExpectAck(4); |
558 EXPECT_CALL(*loss_algorithm, DetectLosses(_, _, _, _, _)); | 558 EXPECT_CALL(*loss_algorithm, DetectLosses(_, _, _, _, _)); |
559 manager_.OnIncomingAck(ack_frame, clock_.Now()); | 559 manager_.OnIncomingAck(ack_frame, clock_.Now()); |
560 RetransmitAndSendPacket(3, 5, LOSS_RETRANSMISSION); | 560 RetransmitAndSendPacket(3, 5, LOSS_RETRANSMISSION); |
561 } | 561 } |
562 | 562 |
563 // Ack 3, which causes SpuriousRetransmitDetected to be called. | 563 // Ack 3, which causes SpuriousRetransmitDetected to be called. |
564 { | 564 { |
565 QuicAckFrame ack_frame = InitAckFrame(4); | 565 QuicAckFrame ack_frame = InitAckFrame(4); |
566 NackPackets(2, 3, &ack_frame); | 566 NackPackets(2, 3, &ack_frame); |
567 EXPECT_CALL(*loss_algorithm, DetectLosses(_, _, _, _, _)); | |
568 EXPECT_CALL(*loss_algorithm, SpuriousRetransmitDetected(_, _, _, 5)); | |
569 manager_.OnIncomingAck(ack_frame, clock_.Now()); | |
570 } | 567 } |
571 } | 568 } |
572 | 569 |
573 TEST_P(QuicSentPacketManagerTest, GetLeastUnacked) { | 570 TEST_P(QuicSentPacketManagerTest, GetLeastUnacked) { |
574 EXPECT_EQ(1u, manager_.GetLeastUnacked(kDefaultPathId)); | 571 EXPECT_EQ(1u, manager_.GetLeastUnacked(kDefaultPathId)); |
575 } | 572 } |
576 | 573 |
577 TEST_P(QuicSentPacketManagerTest, GetLeastUnackedUnacked) { | 574 TEST_P(QuicSentPacketManagerTest, GetLeastUnackedUnacked) { |
578 SendDataPacket(1); | 575 SendDataPacket(1); |
579 EXPECT_EQ(1u, manager_.GetLeastUnacked(kDefaultPathId)); | 576 EXPECT_EQ(1u, manager_.GetLeastUnacked(kDefaultPathId)); |
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1666 ExpectAck(1); | 1663 ExpectAck(1); |
1667 EXPECT_CALL(*network_change_visitor_, | 1664 EXPECT_CALL(*network_change_visitor_, |
1668 OnPathMtuIncreased(kDefaultLength + 100)); | 1665 OnPathMtuIncreased(kDefaultLength + 100)); |
1669 QuicAckFrame ack_frame = InitAckFrame(1); | 1666 QuicAckFrame ack_frame = InitAckFrame(1); |
1670 manager_.OnIncomingAck(ack_frame, clock_.Now()); | 1667 manager_.OnIncomingAck(ack_frame, clock_.Now()); |
1671 } | 1668 } |
1672 | 1669 |
1673 } // namespace | 1670 } // namespace |
1674 } // namespace test | 1671 } // namespace test |
1675 } // namespace net | 1672 } // namespace net |
OLD | NEW |