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_http_stream.h" | 5 #include "net/quic/quic_http_stream.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
10 #include "net/base/test_completion_callback.h" | 10 #include "net/base/test_completion_callback.h" |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 send_algorithm_ = new MockSendAlgorithm(); | 179 send_algorithm_ = new MockSendAlgorithm(); |
180 receive_algorithm_ = new TestReceiveAlgorithm(); | 180 receive_algorithm_ = new TestReceiveAlgorithm(); |
181 EXPECT_CALL(*receive_algorithm_, RecordIncomingPacket(_, _, _)). | 181 EXPECT_CALL(*receive_algorithm_, RecordIncomingPacket(_, _, _)). |
182 Times(AnyNumber()); | 182 Times(AnyNumber()); |
183 EXPECT_CALL(*send_algorithm_, | 183 EXPECT_CALL(*send_algorithm_, |
184 OnPacketSent(_, _, _, _, _)).WillRepeatedly(Return(true)); | 184 OnPacketSent(_, _, _, _, _)).WillRepeatedly(Return(true)); |
185 EXPECT_CALL(*send_algorithm_, RetransmissionDelay()).WillRepeatedly( | 185 EXPECT_CALL(*send_algorithm_, RetransmissionDelay()).WillRepeatedly( |
186 Return(QuicTime::Delta::Zero())); | 186 Return(QuicTime::Delta::Zero())); |
187 EXPECT_CALL(*send_algorithm_, TimeUntilSend(_, _, _, _)). | 187 EXPECT_CALL(*send_algorithm_, TimeUntilSend(_, _, _, _)). |
188 WillRepeatedly(Return(QuicTime::Delta::Zero())); | 188 WillRepeatedly(Return(QuicTime::Delta::Zero())); |
189 EXPECT_CALL(*send_algorithm_, SmoothedRtt()).WillRepeatedly( | |
190 Return(QuicTime::Delta::Zero())); | |
191 EXPECT_CALL(*send_algorithm_, BandwidthEstimate()).WillRepeatedly( | 189 EXPECT_CALL(*send_algorithm_, BandwidthEstimate()).WillRepeatedly( |
192 Return(QuicBandwidth::Zero())); | 190 Return(QuicBandwidth::Zero())); |
193 EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)).Times(AnyNumber()); | 191 EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)).Times(AnyNumber()); |
194 helper_.reset(new QuicConnectionHelper(runner_.get(), &clock_, | 192 helper_.reset(new QuicConnectionHelper(runner_.get(), &clock_, |
195 &random_generator_)); | 193 &random_generator_)); |
196 writer_.reset(new QuicDefaultPacketWriter(socket)); | 194 writer_.reset(new QuicDefaultPacketWriter(socket)); |
197 connection_ = new TestQuicConnection(SupportedVersions(GetParam()), | 195 connection_ = new TestQuicConnection(SupportedVersions(GetParam()), |
198 connection_id_, peer_addr_, | 196 connection_id_, peer_addr_, |
199 helper_.get(), writer_.get()); | 197 helper_.get(), writer_.get()); |
200 connection_->set_visitor(&visitor_); | 198 connection_->set_visitor(&visitor_); |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 // Set Delegate to NULL and make sure EffectivePriority returns highest | 606 // Set Delegate to NULL and make sure EffectivePriority returns highest |
609 // priority. | 607 // priority. |
610 reliable_stream->SetDelegate(NULL); | 608 reliable_stream->SetDelegate(NULL); |
611 DCHECK_EQ(QuicWriteBlockedList::kHighestPriority, | 609 DCHECK_EQ(QuicWriteBlockedList::kHighestPriority, |
612 reliable_stream->EffectivePriority()); | 610 reliable_stream->EffectivePriority()); |
613 reliable_stream->SetDelegate(delegate); | 611 reliable_stream->SetDelegate(delegate); |
614 } | 612 } |
615 | 613 |
616 } // namespace test | 614 } // namespace test |
617 } // namespace net | 615 } // namespace net |
OLD | NEW |