OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_connection.h" | 5 #include "net/quic/quic_connection.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 EXPECT_CALL(*receive_algorithm_, | 629 EXPECT_CALL(*receive_algorithm_, |
630 RecordIncomingPacket(_, _, _)).Times(AnyNumber()); | 630 RecordIncomingPacket(_, _, _)).Times(AnyNumber()); |
631 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)) | 631 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)) |
632 .Times(AnyNumber()); | 632 .Times(AnyNumber()); |
633 EXPECT_CALL(*send_algorithm_, RetransmissionDelay()).WillRepeatedly( | 633 EXPECT_CALL(*send_algorithm_, RetransmissionDelay()).WillRepeatedly( |
634 Return(QuicTime::Delta::Zero())); | 634 Return(QuicTime::Delta::Zero())); |
635 EXPECT_CALL(*send_algorithm_, GetCongestionWindow()).WillRepeatedly( | 635 EXPECT_CALL(*send_algorithm_, GetCongestionWindow()).WillRepeatedly( |
636 Return(kMaxPacketSize)); | 636 Return(kMaxPacketSize)); |
637 ON_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)) | 637 ON_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)) |
638 .WillByDefault(Return(true)); | 638 .WillByDefault(Return(true)); |
| 639 EXPECT_CALL(*send_algorithm_, HasReliableBandwidthEstimate()) |
| 640 .Times(AnyNumber()); |
| 641 EXPECT_CALL(*send_algorithm_, BandwidthEstimate()) |
| 642 .Times(AnyNumber()) |
| 643 .WillRepeatedly(Return(QuicBandwidth::Zero())); |
| 644 EXPECT_CALL(*send_algorithm_, InSlowStart()).Times(AnyNumber()); |
| 645 EXPECT_CALL(*send_algorithm_, InRecovery()).Times(AnyNumber()); |
639 EXPECT_CALL(visitor_, WillingAndAbleToWrite()).Times(AnyNumber()); | 646 EXPECT_CALL(visitor_, WillingAndAbleToWrite()).Times(AnyNumber()); |
640 EXPECT_CALL(visitor_, HasPendingHandshake()).Times(AnyNumber()); | 647 EXPECT_CALL(visitor_, HasPendingHandshake()).Times(AnyNumber()); |
641 EXPECT_CALL(visitor_, OnCanWrite()).Times(AnyNumber()); | 648 EXPECT_CALL(visitor_, OnCanWrite()).Times(AnyNumber()); |
642 EXPECT_CALL(visitor_, HasOpenDataStreams()).WillRepeatedly(Return(false)); | 649 EXPECT_CALL(visitor_, HasOpenDataStreams()).WillRepeatedly(Return(false)); |
| 650 EXPECT_CALL(visitor_, OnCongestionWindowChange(_)).Times(AnyNumber()); |
643 | 651 |
644 EXPECT_CALL(*loss_algorithm_, GetLossTimeout()) | 652 EXPECT_CALL(*loss_algorithm_, GetLossTimeout()) |
645 .WillRepeatedly(Return(QuicTime::Zero())); | 653 .WillRepeatedly(Return(QuicTime::Zero())); |
646 EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _)) | 654 EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _)) |
647 .WillRepeatedly(Return(SequenceNumberSet())); | 655 .WillRepeatedly(Return(SequenceNumberSet())); |
648 } | 656 } |
649 | 657 |
650 QuicVersion version() { | 658 QuicVersion version() { |
651 return GetParam(); | 659 return GetParam(); |
652 } | 660 } |
(...skipping 3296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3949 QuicBlockedFrame blocked; | 3957 QuicBlockedFrame blocked; |
3950 blocked.stream_id = 3; | 3958 blocked.stream_id = 3; |
3951 EXPECT_CALL(visitor_, OnBlockedFrames(_)); | 3959 EXPECT_CALL(visitor_, OnBlockedFrames(_)); |
3952 ProcessFramePacket(QuicFrame(&blocked)); | 3960 ProcessFramePacket(QuicFrame(&blocked)); |
3953 EXPECT_TRUE(ack_alarm->IsSet()); | 3961 EXPECT_TRUE(ack_alarm->IsSet()); |
3954 } | 3962 } |
3955 | 3963 |
3956 } // namespace | 3964 } // namespace |
3957 } // namespace test | 3965 } // namespace test |
3958 } // namespace net | 3966 } // namespace net |
OLD | NEW |