| 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 <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 runner_ = new TestTaskRunner(&clock_); | 214 runner_ = new TestTaskRunner(&clock_); |
| 215 send_algorithm_ = new MockSendAlgorithm(); | 215 send_algorithm_ = new MockSendAlgorithm(); |
| 216 EXPECT_CALL(*send_algorithm_, InRecovery()).WillRepeatedly(Return(false)); | 216 EXPECT_CALL(*send_algorithm_, InRecovery()).WillRepeatedly(Return(false)); |
| 217 EXPECT_CALL(*send_algorithm_, InSlowStart()).WillRepeatedly(Return(false)); | 217 EXPECT_CALL(*send_algorithm_, InSlowStart()).WillRepeatedly(Return(false)); |
| 218 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)) | 218 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)) |
| 219 .WillRepeatedly(Return(true)); | 219 .WillRepeatedly(Return(true)); |
| 220 EXPECT_CALL(*send_algorithm_, RetransmissionDelay()) | 220 EXPECT_CALL(*send_algorithm_, RetransmissionDelay()) |
| 221 .WillRepeatedly(Return(QuicTime::Delta::Zero())); | 221 .WillRepeatedly(Return(QuicTime::Delta::Zero())); |
| 222 EXPECT_CALL(*send_algorithm_, GetCongestionWindow()) | 222 EXPECT_CALL(*send_algorithm_, GetCongestionWindow()) |
| 223 .WillRepeatedly(Return(kMaxPacketSize)); | 223 .WillRepeatedly(Return(kMaxPacketSize)); |
| 224 EXPECT_CALL(*send_algorithm_, PacingRate()) | 224 EXPECT_CALL(*send_algorithm_, PacingRate(_)) |
| 225 .WillRepeatedly(Return(QuicBandwidth::Zero())); | 225 .WillRepeatedly(Return(QuicBandwidth::Zero())); |
| 226 EXPECT_CALL(*send_algorithm_, TimeUntilSend(_, _)) | 226 EXPECT_CALL(*send_algorithm_, TimeUntilSend(_, _)) |
| 227 .WillRepeatedly(Return(QuicTime::Delta::Zero())); | 227 .WillRepeatedly(Return(QuicTime::Delta::Zero())); |
| 228 EXPECT_CALL(*send_algorithm_, BandwidthEstimate()) | 228 EXPECT_CALL(*send_algorithm_, BandwidthEstimate()) |
| 229 .WillRepeatedly(Return(QuicBandwidth::Zero())); | 229 .WillRepeatedly(Return(QuicBandwidth::Zero())); |
| 230 EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)).Times(AnyNumber()); | 230 EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)).Times(AnyNumber()); |
| 231 helper_.reset( | 231 helper_.reset( |
| 232 new QuicChromiumConnectionHelper(&clock_, &random_generator_)); | 232 new QuicChromiumConnectionHelper(&clock_, &random_generator_)); |
| 233 alarm_factory_.reset(new QuicChromiumAlarmFactory(runner_.get(), &clock_)); | 233 alarm_factory_.reset(new QuicChromiumAlarmFactory(runner_.get(), &clock_)); |
| 234 | 234 |
| (...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1716 // QuicHttpStream::GetTotalSent/ReceivedBytes currently only includes the | 1716 // QuicHttpStream::GetTotalSent/ReceivedBytes currently only includes the |
| 1717 // headers and payload. | 1717 // headers and payload. |
| 1718 EXPECT_EQ(static_cast<int64_t>(spdy_request_header_frame_length), | 1718 EXPECT_EQ(static_cast<int64_t>(spdy_request_header_frame_length), |
| 1719 promised_stream_->GetTotalSentBytes()); | 1719 promised_stream_->GetTotalSentBytes()); |
| 1720 EXPECT_EQ(static_cast<int64_t>(spdy_response_header_frame_length), | 1720 EXPECT_EQ(static_cast<int64_t>(spdy_response_header_frame_length), |
| 1721 promised_stream_->GetTotalReceivedBytes()); | 1721 promised_stream_->GetTotalReceivedBytes()); |
| 1722 } | 1722 } |
| 1723 | 1723 |
| 1724 } // namespace test | 1724 } // namespace test |
| 1725 } // namespace net | 1725 } // namespace net |
| OLD | NEW |