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

Unified Diff: net/quic/core/congestion_control/tcp_cubic_sender_packets_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
Index: net/quic/core/congestion_control/tcp_cubic_sender_packets_test.cc
diff --git a/net/quic/core/congestion_control/tcp_cubic_sender_packets_test.cc b/net/quic/core/congestion_control/tcp_cubic_sender_packets_test.cc
index 77bfeb82b1c1b3a7ef1e9a8d5c127afdcc314c6e..91bcea238cd6df23ccc521c8a3543ac8ad1e7c8d 100644
--- a/net/quic/core/congestion_control/tcp_cubic_sender_packets_test.cc
+++ b/net/quic/core/congestion_control/tcp_cubic_sender_packets_test.cc
@@ -134,6 +134,7 @@ class TcpCubicSenderPacketsTest : public ::testing::Test {
bytes_in_flight_ -= kDefaultTCPMSS;
}
+ QuicFlagSaver flags_; // Save/restore all QUIC flag values.
const QuicTime::Delta one_ms_;
MockClock clock_;
std::unique_ptr<TcpCubicSenderPacketsPeer> sender_;
@@ -644,8 +645,7 @@ TEST_F(TcpCubicSenderPacketsTest, TcpCubicResetEpochOnQuiescence) {
}
TEST_F(TcpCubicSenderPacketsTest, TcpCubicShiftedEpochOnQuiescence) {
- ValueRestore<bool> old_flag(&FLAGS_shift_quic_cubic_epoch_when_app_limited,
- true);
+ FLAGS_shift_quic_cubic_epoch_when_app_limited = true;
const int kMaxCongestionWindow = 50;
const QuicByteCount kMaxCongestionWindowBytes =
kMaxCongestionWindow * kDefaultTCPMSS;
« no previous file with comments | « net/quic/core/congestion_control/general_loss_algorithm_test.cc ('k') | net/quic/core/crypto/crypto_server_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698