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

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

Issue 2393933002: Move the logic from SendAlgorithmInterface::RetransmissionDelay() into QuicSentPacketManager, becau… (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | net/quic/core/congestion_control/send_algorithm_interface.h » ('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/chromium/quic_http_stream.h" 5 #include "net/quic/chromium/quic_http_stream.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 273
274 std::unique_ptr<MockUDPClientSocket> socket(new MockUDPClientSocket( 274 std::unique_ptr<MockUDPClientSocket> socket(new MockUDPClientSocket(
275 socket_data_.get(), net_log_.bound().net_log())); 275 socket_data_.get(), net_log_.bound().net_log()));
276 socket->Connect(peer_addr_); 276 socket->Connect(peer_addr_);
277 runner_ = new TestTaskRunner(&clock_); 277 runner_ = new TestTaskRunner(&clock_);
278 send_algorithm_ = new MockSendAlgorithm(); 278 send_algorithm_ = new MockSendAlgorithm();
279 EXPECT_CALL(*send_algorithm_, InRecovery()).WillRepeatedly(Return(false)); 279 EXPECT_CALL(*send_algorithm_, InRecovery()).WillRepeatedly(Return(false));
280 EXPECT_CALL(*send_algorithm_, InSlowStart()).WillRepeatedly(Return(false)); 280 EXPECT_CALL(*send_algorithm_, InSlowStart()).WillRepeatedly(Return(false));
281 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)) 281 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _))
282 .WillRepeatedly(Return(true)); 282 .WillRepeatedly(Return(true));
283 EXPECT_CALL(*send_algorithm_, RetransmissionDelay())
284 .WillRepeatedly(Return(QuicTime::Delta::Zero()));
285 EXPECT_CALL(*send_algorithm_, GetCongestionWindow()) 283 EXPECT_CALL(*send_algorithm_, GetCongestionWindow())
286 .WillRepeatedly(Return(kMaxPacketSize)); 284 .WillRepeatedly(Return(kMaxPacketSize));
287 EXPECT_CALL(*send_algorithm_, PacingRate(_)) 285 EXPECT_CALL(*send_algorithm_, PacingRate(_))
288 .WillRepeatedly(Return(QuicBandwidth::Zero())); 286 .WillRepeatedly(Return(QuicBandwidth::Zero()));
289 EXPECT_CALL(*send_algorithm_, TimeUntilSend(_, _)) 287 EXPECT_CALL(*send_algorithm_, TimeUntilSend(_, _))
290 .WillRepeatedly(Return(QuicTime::Delta::Zero())); 288 .WillRepeatedly(Return(QuicTime::Delta::Zero()));
291 EXPECT_CALL(*send_algorithm_, BandwidthEstimate()) 289 EXPECT_CALL(*send_algorithm_, BandwidthEstimate())
292 .WillRepeatedly(Return(QuicBandwidth::Zero())); 290 .WillRepeatedly(Return(QuicBandwidth::Zero()));
293 EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)).Times(AnyNumber()); 291 EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)).Times(AnyNumber());
294 helper_.reset( 292 helper_.reset(
(...skipping 1767 matching lines...) Expand 10 before | Expand all | Expand 10 after
2062 EXPECT_TRUE(AtEof()); 2060 EXPECT_TRUE(AtEof());
2063 2061
2064 // QuicHttpStream::GetTotalSent/ReceivedBytes includes only headers. 2062 // QuicHttpStream::GetTotalSent/ReceivedBytes includes only headers.
2065 EXPECT_EQ(static_cast<int64_t>(spdy_request_headers_frame_length), 2063 EXPECT_EQ(static_cast<int64_t>(spdy_request_headers_frame_length),
2066 stream_->GetTotalSentBytes()); 2064 stream_->GetTotalSentBytes());
2067 EXPECT_EQ(0, stream_->GetTotalReceivedBytes()); 2065 EXPECT_EQ(0, stream_->GetTotalReceivedBytes());
2068 } 2066 }
2069 2067
2070 } // namespace test 2068 } // namespace test
2071 } // namespace net 2069 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/core/congestion_control/send_algorithm_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698