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

Side by Side Diff: net/tools/quic/stateless_rejector_test.cc

Issue 2227553003: Use the CHLO packet size, not message size when determining how large a REJ can be. Protected by --… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@129101660
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « net/tools/quic/stateless_rejector.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/tools/quic/stateless_rejector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698