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

Unified Diff: chrome/browser/io_thread_unittest.cc

Issue 1998863002: QUIC - added disable_delay_tcp_race field trial param to disable delaying of racing TCP connection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« chrome/browser/io_thread.cc ('K') | « chrome/browser/io_thread.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/io_thread_unittest.cc
diff --git a/chrome/browser/io_thread_unittest.cc b/chrome/browser/io_thread_unittest.cc
index dca30be5f2ae7a5fd0095a847674183a65abfbe8..85eec32c6957465a9a154b3594b4dbe427116353 100644
--- a/chrome/browser/io_thread_unittest.cc
+++ b/chrome/browser/io_thread_unittest.cc
@@ -251,7 +251,7 @@ TEST_F(NetworkSessionConfiguratorTest, EnableQuicFromFieldTrialGroup) {
EXPECT_FALSE(params_.enable_alternative_service_with_different_host);
EXPECT_EQ(0, params_.quic_max_number_of_lossy_connections);
EXPECT_EQ(1.0f, params_.quic_packet_loss_threshold);
- EXPECT_FALSE(params_.quic_delay_tcp_race);
+ EXPECT_TRUE(params_.quic_delay_tcp_race);
EXPECT_FALSE(params_.quic_close_sessions_on_ip_change);
EXPECT_EQ(net::kIdleConnectionTimeoutSeconds,
params_.quic_idle_connection_timeout_seconds);
@@ -577,7 +577,7 @@ TEST_F(NetworkSessionConfiguratorTest, QuicReceiveBufferSize) {
EXPECT_EQ(2097152, params_.quic_socket_receive_buffer_size);
}
-TEST_F(NetworkSessionConfiguratorTest, QuicDelayTcpConnection) {
+TEST_F(NetworkSessionConfiguratorTest, QuicDelayTcpRace) {
std::map<std::string, std::string> field_trial_params;
field_trial_params["delay_tcp_race"] = "true";
variations::AssociateVariationParams("QUIC", "Enabled", field_trial_params);
@@ -588,6 +588,18 @@ TEST_F(NetworkSessionConfiguratorTest, QuicDelayTcpConnection) {
EXPECT_TRUE(params_.quic_delay_tcp_race);
}
+TEST_F(NetworkSessionConfiguratorTest, QuicWithNoDelayTcpRaceParam) {
+ std::map<std::string, std::string> field_trial_params;
+ variations::AssociateVariationParams("QUIC", "Enabled", field_trial_params);
+ base::FieldTrialList::CreateFieldTrial("QUIC", "Enabled");
+
+ ParseFieldTrials();
+
+ // If there is no delay_tcp_race field trial param, then it should default to
+ // true.
+ EXPECT_TRUE(params_.quic_delay_tcp_race);
+}
+
TEST_F(NetworkSessionConfiguratorTest, QuicOriginsToForceQuicOn) {
base::CommandLine::ForCurrentProcess()->AppendSwitch("enable-quic");
base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
« chrome/browser/io_thread.cc ('K') | « chrome/browser/io_thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698