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

Unified Diff: net/tools/quic/quic_dispatcher_test.cc

Issue 2681793002: Landing Recent QUIC changes until 5:30 PM, Feb 3, 2017 UTC-5 (Closed)
Patch Set: sync and rebase Created 3 years, 10 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/tools/quic/quic_dispatcher.cc ('k') | net/tools/quic/quic_server_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_dispatcher_test.cc
diff --git a/net/tools/quic/quic_dispatcher_test.cc b/net/tools/quic/quic_dispatcher_test.cc
index 456622e9dd8e5aa79c8f75fb801fdaadaf7407c2..257ad139b3da09507ae077509485e321008cb538 100644
--- a/net/tools/quic/quic_dispatcher_test.cc
+++ b/net/tools/quic/quic_dispatcher_test.cc
@@ -166,7 +166,7 @@ class MockServerConnection : public MockQuicConnection {
class QuicDispatcherTest : public ::testing::Test {
public:
QuicDispatcherTest()
- : QuicDispatcherTest(CryptoTestUtils::ProofSourceForTesting()) {}
+ : QuicDispatcherTest(crypto_test_utils::ProofSourceForTesting()) {}
explicit QuicDispatcherTest(std::unique_ptr<ProofSource> proof_source)
: helper_(&eps_, QuicAllocator::BUFFER_POOL),
@@ -819,17 +819,13 @@ TEST_P(QuicDispatcherStatelessRejectTest, CheapRejects) {
QUIC_LOG(INFO) << "ExpectStatelessReject: " << ExpectStatelessReject();
QUIC_LOG(INFO) << "Params: " << GetParam();
// Process the first packet for the connection.
- // clang-format off
- CryptoHandshakeMessage client_hello = CryptoTestUtils::Message(
- "CHLO",
- "AEAD", "AESG",
- "KEXS", "C255",
- "COPT", "SREJ",
- "NONC", "1234567890123456789012",
- "VER\0", "Q025",
- "$padding", static_cast<int>(kClientHelloMinimumSize),
- nullptr);
- // clang-format on
+ CryptoHandshakeMessage client_hello =
+ crypto_test_utils::CreateCHLO({{"AEAD", "AESG"},
+ {"KEXS", "C255"},
+ {"COPT", "SREJ"},
+ {"NONC", "1234567890123456789012"},
+ {"VER\0", "Q025"}},
+ kClientHelloMinimumSize);
ProcessPacket(client_address, connection_id, true, false,
client_hello.GetSerialized().AsStringPiece().as_string());
@@ -851,16 +847,12 @@ TEST_P(QuicDispatcherStatelessRejectTest, BufferNonChlo) {
"NOT DATA FOR A CHLO");
// Process the first packet for the connection.
- // clang-format off
- CryptoHandshakeMessage client_hello = CryptoTestUtils::Message(
- "CHLO",
- "AEAD", "AESG",
- "KEXS", "C255",
- "NONC", "1234567890123456789012",
- "VER\0", "Q025",
- "$padding", static_cast<int>(kClientHelloMinimumSize),
- nullptr);
- // clang-format on
+ CryptoHandshakeMessage client_hello =
+ crypto_test_utils::CreateCHLO({{"AEAD", "AESG"},
+ {"KEXS", "C255"},
+ {"NONC", "1234567890123456789012"},
+ {"VER\0", "Q025"}},
+ kClientHelloMinimumSize);
// If stateless rejects are enabled then a connection will be created now
// and the buffered packet will be processed
@@ -1170,11 +1162,12 @@ class BufferedPacketStoreTest
clock_ = QuicDispatcherPeer::GetHelper(dispatcher_.get())->GetClock();
QuicVersion version = AllSupportedVersions().front();
- CryptoHandshakeMessage chlo = CryptoTestUtils::GenerateDefaultInchoateCHLO(
- clock_, version, &crypto_config_);
+ CryptoHandshakeMessage chlo =
+ crypto_test_utils::GenerateDefaultInchoateCHLO(clock_, version,
+ &crypto_config_);
chlo.SetVector(net::kCOPT, net::QuicTagVector{net::kSREJ});
// Pass an inchoate CHLO.
- CryptoTestUtils::GenerateFullCHLO(
+ crypto_test_utils::GenerateFullCHLO(
chlo, &crypto_config_, server_addr_, client_addr_, version, clock_,
signed_config_, QuicDispatcherPeer::GetCache(dispatcher_.get()),
&full_chlo_);
@@ -1610,7 +1603,6 @@ class AsyncGetProofTest : public QuicDispatcherTest {
client_addr_(QuicIpAddress::Loopback4(), 1234),
crypto_config_peer_(&crypto_config_),
signed_config_(new QuicSignedServerConfig) {
- FLAGS_quic_reloadable_flag_enable_async_get_proof = true;
FLAGS_quic_reloadable_flag_enable_quic_stateless_reject_support = true;
FLAGS_quic_reloadable_flag_quic_use_cheap_stateless_rejects = true;
FLAGS_quic_reloadable_flag_quic_create_session_after_insertion = true;
@@ -1621,11 +1613,11 @@ class AsyncGetProofTest : public QuicDispatcherTest {
clock_ = QuicDispatcherPeer::GetHelper(dispatcher_.get())->GetClock();
QuicVersion version = AllSupportedVersions().front();
- chlo_ = CryptoTestUtils::GenerateDefaultInchoateCHLO(clock_, version,
- &crypto_config_);
+ chlo_ = crypto_test_utils::GenerateDefaultInchoateCHLO(clock_, version,
+ &crypto_config_);
chlo_.SetVector(net::kCOPT, net::QuicTagVector{net::kSREJ});
// Pass an inchoate CHLO.
- CryptoTestUtils::GenerateFullCHLO(
+ crypto_test_utils::GenerateFullCHLO(
chlo_, &crypto_config_, server_addr_, client_addr_, version, clock_,
signed_config_, QuicDispatcherPeer::GetCache(dispatcher_.get()),
&full_chlo_);
« no previous file with comments | « net/tools/quic/quic_dispatcher.cc ('k') | net/tools/quic/quic_server_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698