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

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

Issue 2064543002: Add a new rate based sending connection option which uses the pacing rate to keep the bytes_in_flig… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@124273380
Patch Set: Rebase. Created 4 years, 6 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
« no previous file with comments | « net/quic/quic_flags.cc ('k') | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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
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
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
OLDNEW
« no previous file with comments | « net/quic/quic_flags.cc ('k') | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698