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

Unified Diff: net/quic/core/quic_connection_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/crypto/crypto_server_test.cc ('k') | net/quic/core/quic_crypto_client_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_connection_test.cc
diff --git a/net/quic/core/quic_connection_test.cc b/net/quic/core/quic_connection_test.cc
index a24a222430932e8519dc4db79107d02761c04585..01156f16b12050d21fe93d05bbf93e81dff70fea 100644
--- a/net/quic/core/quic_connection_test.cc
+++ b/net/quic/core/quic_connection_test.cc
@@ -1062,6 +1062,8 @@ class QuicConnectionTest : public ::testing::TestWithParam<TestParams> {
InvertPerspective(perspective));
}
+ QuicFlagSaver flags_; // Save/restore all QUIC flag values.
+
QuicConnectionId connection_id_;
QuicFramer framer_;
MockEntropyCalculator entropy_calculator_;
@@ -4984,7 +4986,7 @@ TEST_P(QuicConnectionTest, SendingUnencryptedStreamDataFails) {
TEST_P(QuicConnectionTest, EnableMultipathNegotiation) {
// Test multipath negotiation during crypto handshake. Multipath is enabled
// when both endpoints enable multipath.
- ValueRestore<bool> old_flag(&FLAGS_quic_enable_multipath, true);
+ FLAGS_quic_enable_multipath = true;
EXPECT_TRUE(connection_.connected());
EXPECT_FALSE(QuicConnectionPeer::IsMultipathEnabled(&connection_));
EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
« no previous file with comments | « net/quic/core/crypto/crypto_server_test.cc ('k') | net/quic/core/quic_crypto_client_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698