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

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

Issue 2306173003: Add a new QuicFlagSaver class for saving/restoring the values of QUIC flags in tests. (Closed)
Patch Set: Better Created 4 years, 3 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/quic_connection_test.cc ('k') | net/quic/core/quic_crypto_server_stream_test.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 f8d2216fadce74b77f666831ffdd92ce0a884896..d57d2c4d6dbb2549b8d16490c489c25a996cb087 100644
--- a/net/quic/core/quic_crypto_client_stream_test.cc
+++ b/net/quic/core/quic_crypto_client_stream_test.cc
@@ -309,6 +309,8 @@ class QuicCryptoClientStreamStatelessTest : public ::testing::Test {
FLAGS_enable_quic_stateless_reject_support = true;
}
+ QuicFlagSaver flags_; // Save/restore all QUIC flag values.
+
MockQuicConnectionHelper helper_;
MockAlarmFactory alarm_factory_;
@@ -326,8 +328,7 @@ class QuicCryptoClientStreamStatelessTest : public ::testing::Test {
};
TEST_F(QuicCryptoClientStreamStatelessTest, StatelessReject) {
- ValueRestore<bool> old_flag(&FLAGS_enable_quic_stateless_reject_support,
- true);
+ FLAGS_enable_quic_stateless_reject_support = true;
QuicCryptoClientConfig::CachedState* client_state =
client_crypto_config_.LookupOrCreate(server_id_);
« no previous file with comments | « net/quic/core/quic_connection_test.cc ('k') | net/quic/core/quic_crypto_server_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698