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

Unified Diff: net/quic/core/quic_crypto_server_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_crypto_client_stream_test.cc ('k') | net/quic/core/quic_flags.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_crypto_server_stream_test.cc
diff --git a/net/quic/core/quic_crypto_server_stream_test.cc b/net/quic/core/quic_crypto_server_stream_test.cc
index e58c5fbd3811d4ada33543f8f7b902231b559444..e3c466c31ca41e6fc659f76ab9ae560d6b88211d 100644
--- a/net/quic/core/quic_crypto_server_stream_test.cc
+++ b/net/quic/core/quic_crypto_server_stream_test.cc
@@ -171,6 +171,8 @@ class QuicCryptoServerStreamTest : public ::testing::TestWithParam<bool> {
}
protected:
+ QuicFlagSaver flags_; // Save/restore all QUIC flag values.
+
// Every connection gets its own MockQuicConnectionHelper and
// MockAlarmFactory,
// tracked separately from
@@ -247,8 +249,8 @@ TEST_P(QuicCryptoServerStreamTest, ForwardSecureAfterCHLO) {
}
TEST_P(QuicCryptoServerStreamTest, StatelessRejectAfterCHLO) {
- ValueRestore<bool> old_flag(&FLAGS_enable_quic_stateless_reject_support,
- true);
+ FLAGS_enable_quic_stateless_reject_support = true;
+
Initialize();
EXPECT_CALL(*server_connection_,
@@ -281,8 +283,8 @@ TEST_P(QuicCryptoServerStreamTest, StatelessRejectAfterCHLO) {
}
TEST_P(QuicCryptoServerStreamTest, ConnectedAfterStatelessHandshake) {
- ValueRestore<bool> old_flag(&FLAGS_enable_quic_stateless_reject_support,
- true);
+ FLAGS_enable_quic_stateless_reject_support = true;
+
Initialize();
InitializeFakeClient(/* supports_stateless_rejects= */ true);
@@ -326,8 +328,8 @@ TEST_P(QuicCryptoServerStreamTest, ConnectedAfterStatelessHandshake) {
}
TEST_P(QuicCryptoServerStreamTest, NoStatelessRejectIfNoClientSupport) {
- ValueRestore<bool> old_flag(&FLAGS_enable_quic_stateless_reject_support,
- true);
+ FLAGS_enable_quic_stateless_reject_support = true;
+
Initialize();
// The server is configured to use stateless rejects, but the client does not
« no previous file with comments | « net/quic/core/quic_crypto_client_stream_test.cc ('k') | net/quic/core/quic_flags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698