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

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

Issue 2678973002: Replace va_arg version of crypto_test_utils::Message with a more modern vector argument version. (Closed)
Patch Set: 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/quic/test_tools/crypto_test_utils_test.cc ('k') | net/tools/quic/stateless_rejector_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 e58953f938f773fba45bd4450f31d4a01ded0126..257ad139b3da09507ae077509485e321008cb538 100644
--- a/net/tools/quic/quic_dispatcher_test.cc
+++ b/net/tools/quic/quic_dispatcher_test.cc
@@ -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 = crypto_test_utils::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 = crypto_test_utils::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
« no previous file with comments | « net/quic/test_tools/crypto_test_utils_test.cc ('k') | net/tools/quic/stateless_rejector_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698