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

Unified Diff: net/quic/test_tools/crypto_test_utils_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.cc ('k') | net/tools/quic/quic_dispatcher_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/crypto_test_utils_test.cc
diff --git a/net/quic/test_tools/crypto_test_utils_test.cc b/net/quic/test_tools/crypto_test_utils_test.cc
index d2b4524ae2e8c481a7780cb00daab372f0e0d377..2349f1f9c5154e2c5fb1f6f601fe8999587aa8eb 100644
--- a/net/quic/test_tools/crypto_test_utils_test.cc
+++ b/net/quic/test_tools/crypto_test_utils_test.cc
@@ -148,19 +148,15 @@ TEST(CryptoTestUtilsTest, TestGenerateFullCHLO) {
"#" + QuicTextUtils::HexEncode(public_value, sizeof(public_value));
QuicVersion version(AllSupportedVersions().front());
- // clang-format off
- CryptoHandshakeMessage inchoate_chlo = crypto_test_utils::Message(
- "CHLO",
- "PDMD", "X509",
- "AEAD", "AESG",
- "KEXS", "C255",
- "COPT", "SREJ",
- "PUBS", pub_hex.c_str(),
- "NONC", nonce_hex.c_str(),
- "VER\0", QuicTagToString(QuicVersionToQuicTag(version)).c_str(),
- "$padding", static_cast<int>(kClientHelloMinimumSize),
- nullptr);
- // clang-format on
+ CryptoHandshakeMessage inchoate_chlo = crypto_test_utils::CreateCHLO(
+ {{"PDMD", "X509"},
+ {"AEAD", "AESG"},
+ {"KEXS", "C255"},
+ {"COPT", "SREJ"},
+ {"PUBS", pub_hex},
+ {"NONC", nonce_hex},
+ {"VER\0", QuicTagToString(QuicVersionToQuicTag(version))}},
+ kClientHelloMinimumSize);
crypto_test_utils::GenerateFullCHLO(
inchoate_chlo, &crypto_config, server_addr, client_addr, version, &clock,
« no previous file with comments | « net/quic/test_tools/crypto_test_utils.cc ('k') | net/tools/quic/quic_dispatcher_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698