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 <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 EXPECT_CALL(*send_algorithm_, InRecovery()).WillRepeatedly(Return(false)); | 203 EXPECT_CALL(*send_algorithm_, InRecovery()).WillRepeatedly(Return(false)); |
204 EXPECT_CALL(*send_algorithm_, InSlowStart()).WillRepeatedly(Return(false)); | 204 EXPECT_CALL(*send_algorithm_, InSlowStart()).WillRepeatedly(Return(false)); |
205 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)) | 205 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)) |
206 .WillRepeatedly(Return(true)); | 206 .WillRepeatedly(Return(true)); |
207 EXPECT_CALL(*send_algorithm_, RetransmissionDelay()) | 207 EXPECT_CALL(*send_algorithm_, RetransmissionDelay()) |
208 .WillRepeatedly(Return(QuicTime::Delta::Zero())); | 208 .WillRepeatedly(Return(QuicTime::Delta::Zero())); |
209 EXPECT_CALL(*send_algorithm_, GetCongestionWindow()) | 209 EXPECT_CALL(*send_algorithm_, GetCongestionWindow()) |
210 .WillRepeatedly(Return(kMaxPacketSize)); | 210 .WillRepeatedly(Return(kMaxPacketSize)); |
211 EXPECT_CALL(*send_algorithm_, PacingRate()) | 211 EXPECT_CALL(*send_algorithm_, PacingRate()) |
212 .WillRepeatedly(Return(QuicBandwidth::Zero())); | 212 .WillRepeatedly(Return(QuicBandwidth::Zero())); |
213 EXPECT_CALL(*send_algorithm_, TimeUntilSend(_, _, _)) | 213 EXPECT_CALL(*send_algorithm_, TimeUntilSend(_, _)) |
214 .WillRepeatedly(Return(QuicTime::Delta::Zero())); | 214 .WillRepeatedly(Return(QuicTime::Delta::Zero())); |
215 EXPECT_CALL(*send_algorithm_, BandwidthEstimate()) | 215 EXPECT_CALL(*send_algorithm_, BandwidthEstimate()) |
216 .WillRepeatedly(Return(QuicBandwidth::Zero())); | 216 .WillRepeatedly(Return(QuicBandwidth::Zero())); |
217 EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)).Times(AnyNumber()); | 217 EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)).Times(AnyNumber()); |
218 helper_.reset(new QuicChromiumConnectionHelper(runner_.get(), &clock_, | 218 helper_.reset(new QuicChromiumConnectionHelper(runner_.get(), &clock_, |
219 &random_generator_)); | 219 &random_generator_)); |
220 connection_ = new TestQuicConnection( | 220 connection_ = new TestQuicConnection( |
221 SupportedVersions(GetParam()), connection_id_, peer_addr_, | 221 SupportedVersions(GetParam()), connection_id_, peer_addr_, |
222 helper_.get(), new QuicChromiumPacketWriter(socket)); | 222 helper_.get(), new QuicChromiumPacketWriter(socket)); |
223 connection_->set_visitor(&visitor_); | 223 connection_->set_visitor(&visitor_); |
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1636 // QuicHttpStream::GetTotalSent/ReceivedBytes currently only includes the | 1636 // QuicHttpStream::GetTotalSent/ReceivedBytes currently only includes the |
1637 // headers and payload. | 1637 // headers and payload. |
1638 EXPECT_EQ(static_cast<int64_t>(spdy_request_header_frame_length), | 1638 EXPECT_EQ(static_cast<int64_t>(spdy_request_header_frame_length), |
1639 promised_stream_->GetTotalSentBytes()); | 1639 promised_stream_->GetTotalSentBytes()); |
1640 EXPECT_EQ(static_cast<int64_t>(spdy_response_header_frame_length), | 1640 EXPECT_EQ(static_cast<int64_t>(spdy_response_header_frame_length), |
1641 promised_stream_->GetTotalReceivedBytes()); | 1641 promised_stream_->GetTotalReceivedBytes()); |
1642 } | 1642 } |
1643 | 1643 |
1644 } // namespace test | 1644 } // namespace test |
1645 } // namespace net | 1645 } // namespace net |
OLD | NEW |