OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/tools/quic/stateless_rejector.h" | 5 #include "net/tools/quic/stateless_rejector.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "net/quic/core/crypto/crypto_handshake_message.h" | 10 #include "net/quic/core/crypto/crypto_handshake_message.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 CryptoTestUtils::ProofSourceForTesting()), | 61 CryptoTestUtils::ProofSourceForTesting()), |
62 config_peer_(&config_), | 62 config_peer_(&config_), |
63 compressed_certs_cache_( | 63 compressed_certs_cache_( |
64 QuicCompressedCertsCache::kQuicCompressedCertsCacheSize), | 64 QuicCompressedCertsCache::kQuicCompressedCertsCacheSize), |
65 rejector_(GetParam().version, | 65 rejector_(GetParam().version, |
66 QuicSupportedVersions(), | 66 QuicSupportedVersions(), |
67 &config_, | 67 &config_, |
68 &compressed_certs_cache_, | 68 &compressed_certs_cache_, |
69 &clock_, | 69 &clock_, |
70 QuicRandom::GetInstance(), | 70 QuicRandom::GetInstance(), |
| 71 kDefaultMaxPacketSize, |
71 IPEndPoint(net::test::Loopback4(), 12345), | 72 IPEndPoint(net::test::Loopback4(), 12345), |
72 IPEndPoint(net::test::Loopback4(), 443)) { | 73 IPEndPoint(net::test::Loopback4(), 443)) { |
73 FLAGS_enable_quic_stateless_reject_support = | 74 FLAGS_enable_quic_stateless_reject_support = |
74 GetParam().flags == ENABLED || GetParam().flags == CHEAP_DISABLED; | 75 GetParam().flags == ENABLED || GetParam().flags == CHEAP_DISABLED; |
75 FLAGS_quic_use_cheap_stateless_rejects = | 76 FLAGS_quic_use_cheap_stateless_rejects = |
76 GetParam().flags == ENABLED || GetParam().flags == STATELESS_DISABLED; | 77 GetParam().flags == ENABLED || GetParam().flags == STATELESS_DISABLED; |
77 | 78 |
78 // Add a new primary config. | 79 // Add a new primary config. |
79 std::unique_ptr<CryptoHandshakeMessage> msg(config_.AddDefaultConfig( | 80 std::unique_ptr<CryptoHandshakeMessage> msg(config_.AddDefaultConfig( |
80 QuicRandom::GetInstance(), &clock_, config_options_)); | 81 QuicRandom::GetInstance(), &clock_, config_options_)); |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 if (GetParam().flags != ENABLED || GetParam().version <= QUIC_VERSION_32) { | 233 if (GetParam().flags != ENABLED || GetParam().version <= QUIC_VERSION_32) { |
233 EXPECT_EQ(StatelessRejector::UNSUPPORTED, rejector_.state()); | 234 EXPECT_EQ(StatelessRejector::UNSUPPORTED, rejector_.state()); |
234 return; | 235 return; |
235 } | 236 } |
236 EXPECT_EQ(StatelessRejector::ACCEPTED, rejector_.state()); | 237 EXPECT_EQ(StatelessRejector::ACCEPTED, rejector_.state()); |
237 } | 238 } |
238 | 239 |
239 } // namespace | 240 } // namespace |
240 } // namespace test | 241 } // namespace test |
241 } // namespace net | 242 } // namespace net |
OLD | NEW |