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

Unified Diff: net/quic/core/quic_crypto_client_stream_test.cc

Issue 2679783003: Deprecate FLAGS_quic_reloadable_flag_enable_async_get_proof (Closed)
Patch Set: Address gredner's comments. 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/core/crypto/quic_crypto_server_config.cc ('k') | net/quic/core/quic_crypto_server_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_crypto_client_stream_test.cc
diff --git a/net/quic/core/quic_crypto_client_stream_test.cc b/net/quic/core/quic_crypto_client_stream_test.cc
index 8cd39916b1cc0d5038369fe0ef1ff7ddebf8bb67..571ca249c749359ba0a58a2c8e2ce2b22cedcc81 100644
--- a/net/quic/core/quic_crypto_client_stream_test.cc
+++ b/net/quic/core/quic_crypto_client_stream_test.cc
@@ -252,12 +252,32 @@ TEST_F(QuicCryptoClientStreamTest, ServerConfigUpdateWithCert) {
QuicCompressedCertsCache cache(1);
CachedNetworkParameters network_params;
CryptoHandshakeMessage server_config_update;
- EXPECT_TRUE(crypto_config.BuildServerConfigUpdateMessage(
+
+ class Callback : public BuildServerConfigUpdateMessageResultCallback {
+ public:
+ Callback(bool* ok, CryptoHandshakeMessage* message)
+ : ok_(ok), message_(message) {}
+ void Run(bool ok, const CryptoHandshakeMessage& message) override {
+ *ok_ = ok;
+ *message_ = message;
+ }
+
+ private:
+ bool* ok_;
+ CryptoHandshakeMessage* message_;
+ };
+
+ // Note: relies on the callback being invoked synchronously
+ bool ok = false;
+ crypto_config.BuildServerConfigUpdateMessage(
session_->connection()->version(), stream()->chlo_hash(), tokens,
QuicSocketAddress(QuicIpAddress::Loopback6(), 1234),
QuicIpAddress::Loopback6(), connection_->clock(),
QuicRandom::GetInstance(), &cache, stream()->crypto_negotiated_params(),
- &network_params, QuicTagVector(), &server_config_update));
+ &network_params, QuicTagVector(),
+ std::unique_ptr<BuildServerConfigUpdateMessageResultCallback>(
+ new Callback(&ok, &server_config_update)));
+ EXPECT_TRUE(ok);
std::unique_ptr<QuicData> data(
CryptoFramer::ConstructHandshakeMessage(server_config_update));
« no previous file with comments | « net/quic/core/crypto/quic_crypto_server_config.cc ('k') | net/quic/core/quic_crypto_server_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698