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

Side by Side Diff: net/quic/quic_connection_test.cc

Issue 490263003: When talking >=QUIC_VERSION_22, regularly send updated bandwidth (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698