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 1df2313ada8b76e1fcff041b796251f85bb302af..8e14d775154f4924830d872b1b99747c6f57caa2 100644 |
--- a/net/quic/quic_crypto_client_stream_test.cc |
+++ b/net/quic/quic_crypto_client_stream_test.cc |
@@ -34,6 +34,8 @@ class QuicCryptoClientStreamTest : public ::testing::Test { |
stream_(new QuicCryptoClientStream(server_id_, session_.get(), nullptr, |
&crypto_config_)) { |
session_->SetCryptoStream(stream_.get()); |
+ // Advance the time, because timers do not like uninitialized times. |
+ connection_->AdvanceTime(QuicTime::Delta::FromSeconds(1)); |
} |
void CompleteCryptoHandshake() { |
@@ -128,8 +130,8 @@ TEST_F(QuicCryptoClientStreamTest, ExpiredServerConfig) { |
// Advance time 5 years to ensure that we pass the expiry time of the cached |
// server config. |
- reinterpret_cast<MockClock*>(const_cast<QuicClock*>(connection_->clock())) |
- ->AdvanceTime(QuicTime::Delta::FromSeconds(60 * 60 * 24 * 365 * 5)); |
+ connection_->AdvanceTime( |
+ QuicTime::Delta::FromSeconds(60 * 60 * 24 * 365 * 5)); |
// Check that a client hello was sent and that CryptoConnect doesn't fail |
// with an error. |