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

Unified Diff: net/quic/quic_http_stream_test.cc

Issue 1905843003: Split out QuicAlarm creation from QuicConnectionHelper to new QuicAlarmFactory. No behavior change,… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@119753783
Patch Set: Rebase Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_headers_stream_test.cc ('k') | net/quic/quic_session_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_http_stream_test.cc
diff --git a/net/quic/quic_http_stream_test.cc b/net/quic/quic_http_stream_test.cc
index 47743652345aeaf5b1d461045bae1b6e15e066a1..2254f45363f2c33e474d594857f9a7cc2345dd0d 100644
--- a/net/quic/quic_http_stream_test.cc
+++ b/net/quic/quic_http_stream_test.cc
@@ -29,6 +29,7 @@
#include "net/quic/crypto/quic_decrypter.h"
#include "net/quic/crypto/quic_encrypter.h"
#include "net/quic/crypto/quic_server_info.h"
+#include "net/quic/quic_chromium_alarm_factory.h"
#include "net/quic/quic_chromium_client_session.h"
#include "net/quic/quic_chromium_client_stream.h"
#include "net/quic/quic_chromium_connection_helper.h"
@@ -74,10 +75,12 @@ class TestQuicConnection : public QuicConnection {
QuicConnectionId connection_id,
IPEndPoint address,
QuicChromiumConnectionHelper* helper,
+ QuicChromiumAlarmFactory* alarm_factory,
QuicPacketWriter* writer)
: QuicConnection(connection_id,
address,
helper,
+ alarm_factory,
writer,
true /* owns_writer */,
Perspective::IS_CLIENT,
@@ -218,11 +221,14 @@ class QuicHttpStreamTest : public ::testing::TestWithParam<QuicVersion> {
EXPECT_CALL(*send_algorithm_, BandwidthEstimate())
.WillRepeatedly(Return(QuicBandwidth::Zero()));
EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)).Times(AnyNumber());
- helper_.reset(new QuicChromiumConnectionHelper(runner_.get(), &clock_,
+ helper_.reset(new QuicChromiumConnectionHelper(&clock_,
&random_generator_));
+ alarm_factory_.reset(new QuicChromiumAlarmFactory(runner_.get(), &clock_));
+
connection_ = new TestQuicConnection(
SupportedVersions(GetParam()), connection_id_, peer_addr_,
- helper_.get(), new QuicChromiumPacketWriter(socket.get()));
+ helper_.get(), alarm_factory_.get(),
+ new QuicChromiumPacketWriter(socket.get()));
connection_->set_visitor(&visitor_);
connection_->SetSendAlgorithm(send_algorithm_);
@@ -429,6 +435,7 @@ class QuicHttpStreamTest : public ::testing::TestWithParam<QuicVersion> {
MockClock clock_;
TestQuicConnection* connection_;
std::unique_ptr<QuicChromiumConnectionHelper> helper_;
+ std::unique_ptr<QuicChromiumAlarmFactory> alarm_factory_;
testing::StrictMock<MockConnectionVisitor> visitor_;
std::unique_ptr<QuicHttpStream> stream_;
TransportSecurityState transport_security_state_;
« no previous file with comments | « net/quic/quic_headers_stream_test.cc ('k') | net/quic/quic_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698