| Index: net/quic/core/crypto/quic_crypto_client_config_test.cc
|
| diff --git a/net/quic/core/crypto/quic_crypto_client_config_test.cc b/net/quic/core/crypto/quic_crypto_client_config_test.cc
|
| index 82c10daeef864c7b415722befd06ae5523a21a6d..12d7dbc2ac1a50cfaf0c0e4e77cc67def4c07d64 100644
|
| --- a/net/quic/core/crypto/quic_crypto_client_config_test.cc
|
| +++ b/net/quic/core/crypto/quic_crypto_client_config_test.cc
|
| @@ -477,6 +477,31 @@ TEST(QuicCryptoClientConfigTest, ProcessReject) {
|
| EXPECT_FALSE(cached.has_server_nonce());
|
| }
|
|
|
| +TEST(QuicCryptoClientConfigTest, ProcessRejectWithLongTTL) {
|
| + CryptoHandshakeMessage rej;
|
| + CryptoTestUtils::FillInDummyReject(&rej, /* stateless */ false);
|
| + QuicTime::Delta one_week = QuicTime::Delta::FromSeconds(kNumSecondsPerWeek);
|
| + int64_t long_ttl = 3 * one_week.ToSeconds();
|
| + rej.SetValue(kSTTL, long_ttl);
|
| +
|
| + // Now process the rejection.
|
| + QuicCryptoClientConfig::CachedState cached;
|
| + scoped_refptr<QuicCryptoNegotiatedParameters> out_params(
|
| + new QuicCryptoNegotiatedParameters);
|
| + string error;
|
| + QuicCryptoClientConfig config(CryptoTestUtils::ProofVerifierForTesting());
|
| + EXPECT_EQ(QUIC_NO_ERROR,
|
| + config.ProcessRejection(rej, QuicWallTime::FromUNIXSeconds(0),
|
| + AllSupportedVersions().front(), "", &cached,
|
| + out_params, &error));
|
| + cached.SetProofValid();
|
| + EXPECT_FALSE(cached.IsComplete(QuicWallTime::FromUNIXSeconds(long_ttl)));
|
| + EXPECT_FALSE(
|
| + cached.IsComplete(QuicWallTime::FromUNIXSeconds(one_week.ToSeconds())));
|
| + EXPECT_TRUE(cached.IsComplete(
|
| + QuicWallTime::FromUNIXSeconds(one_week.ToSeconds() - 1)));
|
| +}
|
| +
|
| TEST(QuicCryptoClientConfigTest, ProcessStatelessReject) {
|
| // Create a dummy reject message and mark it as stateless.
|
| CryptoHandshakeMessage rej;
|
|
|