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

Unified Diff: net/quic/quic_crypto_client_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_connection_test.cc ('k') | net/quic/quic_crypto_server_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_crypto_client_stream_test.cc
diff --git a/net/quic/quic_crypto_client_stream_test.cc b/net/quic/quic_crypto_client_stream_test.cc
index 54ecb91433b93f10c9a38b5129fa84eb76c20eed..a42585a22e87707b42842eced041c538ea3e7320 100644
--- a/net/quic/quic_crypto_client_stream_test.cc
+++ b/net/quic/quic_crypto_client_stream_test.cc
@@ -40,7 +40,8 @@ class QuicCryptoClientStreamTest : public ::testing::Test {
}
void CreateConnection() {
- connection_ = new PacketSavingConnection(&helper_, Perspective::IS_CLIENT);
+ connection_ = new PacketSavingConnection(&helper_, &alarm_factory_,
+ Perspective::IS_CLIENT);
// Advance the time, because timers do not like uninitialized times.
connection_->AdvanceTime(QuicTime::Delta::FromSeconds(1));
@@ -50,8 +51,8 @@ class QuicCryptoClientStreamTest : public ::testing::Test {
void CompleteCryptoHandshake() {
stream()->CryptoConnect();
- CryptoTestUtils::HandshakeWithFakeServer(&helper_, connection_, stream(),
- server_options_);
+ CryptoTestUtils::HandshakeWithFakeServer(
+ &helper_, &alarm_factory_, connection_, stream(), server_options_);
}
void ConstructHandshakeMessage() {
@@ -62,6 +63,7 @@ class QuicCryptoClientStreamTest : public ::testing::Test {
QuicCryptoClientStream* stream() { return session_->GetCryptoStream(); }
MockConnectionHelper helper_;
+ MockAlarmFactory alarm_factory_;
PacketSavingConnection* connection_;
std::unique_ptr<TestQuicSpdyClientSession> session_;
QuicServerId server_id_;
@@ -267,11 +269,12 @@ class QuicCryptoClientStreamStatelessTest : public ::testing::Test {
QuicCompressedCertsCache::kQuicCompressedCertsCacheSize),
server_id_(kServerHostname, kServerPort, PRIVACY_MODE_DISABLED) {
TestQuicSpdyClientSession* client_session = nullptr;
- CreateClientSessionForTest(
- server_id_,
- /* supports_stateless_rejects= */ true,
- QuicTime::Delta::FromSeconds(100000), QuicSupportedVersions(), &helper_,
- &client_crypto_config_, &client_connection_, &client_session);
+ CreateClientSessionForTest(server_id_,
+ /* supports_stateless_rejects= */ true,
+ QuicTime::Delta::FromSeconds(100000),
+ QuicSupportedVersions(), &helper_,
+ &alarm_factory_, &client_crypto_config_,
+ &client_connection_, &client_session);
CHECK(client_session);
client_session_.reset(client_session);
}
@@ -290,10 +293,11 @@ class QuicCryptoClientStreamStatelessTest : public ::testing::Test {
// Initializes the server_stream_ for stateless rejects.
void InitializeFakeStatelessRejectServer() {
TestQuicSpdyServerSession* server_session = nullptr;
- CreateServerSessionForTest(
- server_id_, QuicTime::Delta::FromSeconds(100000),
- QuicSupportedVersions(), &helper_, &server_crypto_config_,
- &server_compressed_certs_cache_, &server_connection_, &server_session);
+ CreateServerSessionForTest(server_id_, QuicTime::Delta::FromSeconds(100000),
+ QuicSupportedVersions(), &helper_,
+ &alarm_factory_, &server_crypto_config_,
+ &server_compressed_certs_cache_,
+ &server_connection_, &server_session);
CHECK(server_session);
server_session_.reset(server_session);
CryptoTestUtils::FakeServerOptions options;
@@ -304,6 +308,7 @@ class QuicCryptoClientStreamStatelessTest : public ::testing::Test {
}
MockConnectionHelper helper_;
+ MockAlarmFactory alarm_factory_;
// Client crypto stream state
PacketSavingConnection* client_connection_;
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_crypto_server_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698