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

Unified Diff: chrome/browser/io_thread_unittest.cc

Issue 804813010: QUIC - enabled FLAGS_allow_truncated_connection_ids_for_quic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change the polarity of options to quic_enable_truncated_connection_ids Created 5 years, 11 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: chrome/browser/io_thread_unittest.cc
diff --git a/chrome/browser/io_thread_unittest.cc b/chrome/browser/io_thread_unittest.cc
index 80a589d7fec4914a372114463365c06240088286..e2ebd902cc1f150ea0d67289d6f9da2f9834ab17 100644
--- a/chrome/browser/io_thread_unittest.cc
+++ b/chrome/browser/io_thread_unittest.cc
@@ -135,6 +135,7 @@ TEST_F(IOThreadTest, EnableQuicFromFieldTrialGroup) {
EXPECT_EQ(0, params.quic_load_server_info_timeout_ms);
EXPECT_FALSE(params.quic_disable_loading_server_info_for_new_servers);
EXPECT_EQ(0.0f, params.quic_load_server_info_timeout_srtt_multiplier);
+ EXPECT_FALSE(params.quic_enable_truncated_connection_ids);
}
TEST_F(IOThreadTest, EnableQuicFromCommandLine) {
@@ -145,6 +146,7 @@ TEST_F(IOThreadTest, EnableQuicFromCommandLine) {
InitializeNetworkSessionParams(&params);
EXPECT_TRUE(params.enable_quic);
EXPECT_FALSE(params.quic_disable_loading_server_info_for_new_servers);
+ EXPECT_FALSE(params.quic_enable_truncated_connection_ids);
Ryan Hamilton 2015/01/08 23:17:00 No need to test for this in all the tests. Just th
ramant (doing other things) 2015/01/08 23:40:21 Done.
}
TEST_F(IOThreadTest, EnablePacingFromCommandLine) {
@@ -158,6 +160,7 @@ TEST_F(IOThreadTest, EnablePacingFromCommandLine) {
options.push_back(net::kPACE);
EXPECT_EQ(options, params.quic_connection_options);
EXPECT_FALSE(params.quic_disable_loading_server_info_for_new_servers);
+ EXPECT_FALSE(params.quic_enable_truncated_connection_ids);
}
TEST_F(IOThreadTest, EnablePacingFromFieldTrialParams) {
@@ -171,6 +174,7 @@ TEST_F(IOThreadTest, EnablePacingFromFieldTrialParams) {
options.push_back(net::kPACE);
EXPECT_EQ(options, params.quic_connection_options);
EXPECT_FALSE(params.quic_disable_loading_server_info_for_new_servers);
+ EXPECT_FALSE(params.quic_enable_truncated_connection_ids);
}
TEST_F(IOThreadTest, PacketLengthFromCommandLine) {
@@ -182,6 +186,7 @@ TEST_F(IOThreadTest, PacketLengthFromCommandLine) {
InitializeNetworkSessionParams(&params);
EXPECT_EQ(1450u, params.quic_max_packet_length);
EXPECT_FALSE(params.quic_disable_loading_server_info_for_new_servers);
+ EXPECT_FALSE(params.quic_enable_truncated_connection_ids);
}
TEST_F(IOThreadTest, PacketLengthFromFieldTrialParams) {
@@ -193,6 +198,7 @@ TEST_F(IOThreadTest, PacketLengthFromFieldTrialParams) {
InitializeNetworkSessionParams(&params);
EXPECT_EQ(1450u, params.quic_max_packet_length);
EXPECT_FALSE(params.quic_disable_loading_server_info_for_new_servers);
+ EXPECT_FALSE(params.quic_enable_truncated_connection_ids);
}
TEST_F(IOThreadTest, QuicVersionFromCommandLine) {
@@ -208,6 +214,7 @@ TEST_F(IOThreadTest, QuicVersionFromCommandLine) {
supported_versions.push_back(net::QuicSupportedVersions().back());
EXPECT_EQ(supported_versions, params.quic_supported_versions);
EXPECT_FALSE(params.quic_disable_loading_server_info_for_new_servers);
+ EXPECT_FALSE(params.quic_enable_truncated_connection_ids);
}
TEST_F(IOThreadTest, QuicVersionFromFieldTrialParams) {
@@ -222,6 +229,7 @@ TEST_F(IOThreadTest, QuicVersionFromFieldTrialParams) {
supported_versions.push_back(net::QuicSupportedVersions().back());
EXPECT_EQ(supported_versions, params.quic_supported_versions);
EXPECT_FALSE(params.quic_disable_loading_server_info_for_new_servers);
+ EXPECT_FALSE(params.quic_enable_truncated_connection_ids);
}
TEST_F(IOThreadTest, QuicConnectionOptionsFromCommandLine) {
@@ -240,6 +248,7 @@ TEST_F(IOThreadTest, QuicConnectionOptionsFromCommandLine) {
options.push_back(net::kREJ);
EXPECT_EQ(options, params.quic_connection_options);
EXPECT_FALSE(params.quic_disable_loading_server_info_for_new_servers);
+ EXPECT_FALSE(params.quic_enable_truncated_connection_ids);
}
TEST_F(IOThreadTest, QuicConnectionOptionsFromFieldTrialParams) {
@@ -257,6 +266,7 @@ TEST_F(IOThreadTest, QuicConnectionOptionsFromFieldTrialParams) {
options.push_back(net::kREJ);
EXPECT_EQ(options, params.quic_connection_options);
EXPECT_FALSE(params.quic_disable_loading_server_info_for_new_servers);
+ EXPECT_FALSE(params.quic_enable_truncated_connection_ids);
}
TEST_F(IOThreadTest, QuicConnectionOptionsFromDeprecatedFieldTrialParams) {
@@ -274,6 +284,7 @@ TEST_F(IOThreadTest, QuicConnectionOptionsFromDeprecatedFieldTrialParams) {
options.push_back(net::kREJ);
EXPECT_EQ(options, params.quic_connection_options);
EXPECT_FALSE(params.quic_disable_loading_server_info_for_new_servers);
+ EXPECT_FALSE(params.quic_enable_truncated_connection_ids);
}
TEST_F(IOThreadTest,
@@ -285,6 +296,7 @@ TEST_F(IOThreadTest,
InitializeNetworkSessionParams(&params);
EXPECT_TRUE(params.quic_always_require_handshake_confirmation);
EXPECT_FALSE(params.quic_disable_loading_server_info_for_new_servers);
+ EXPECT_FALSE(params.quic_enable_truncated_connection_ids);
}
TEST_F(IOThreadTest,
@@ -296,6 +308,7 @@ TEST_F(IOThreadTest,
InitializeNetworkSessionParams(&params);
EXPECT_TRUE(params.quic_disable_connection_pooling);
EXPECT_FALSE(params.quic_disable_loading_server_info_for_new_servers);
+ EXPECT_FALSE(params.quic_enable_truncated_connection_ids);
}
TEST_F(IOThreadTest, QuicLoadServerInfoTimeoutFromFieldTrialParams) {
@@ -306,6 +319,7 @@ TEST_F(IOThreadTest, QuicLoadServerInfoTimeoutFromFieldTrialParams) {
InitializeNetworkSessionParams(&params);
EXPECT_EQ(50, params.quic_load_server_info_timeout_ms);
EXPECT_FALSE(params.quic_disable_loading_server_info_for_new_servers);
+ EXPECT_FALSE(params.quic_enable_truncated_connection_ids);
}
TEST_F(IOThreadTest, QuicDisableLoadingServerInfoForNewServers) {
@@ -315,6 +329,7 @@ TEST_F(IOThreadTest, QuicDisableLoadingServerInfoForNewServers) {
net::HttpNetworkSession::Params params;
InitializeNetworkSessionParams(&params);
EXPECT_TRUE(params.quic_disable_loading_server_info_for_new_servers);
+ EXPECT_FALSE(params.quic_enable_truncated_connection_ids);
}
TEST_F(IOThreadTest, QuicLoadServerInfoTimeToSmoothedRttFromFieldTrialParams) {
@@ -326,6 +341,15 @@ TEST_F(IOThreadTest, QuicLoadServerInfoTimeToSmoothedRttFromFieldTrialParams) {
EXPECT_EQ(0.5f, params.quic_load_server_info_timeout_srtt_multiplier);
}
+TEST_F(IOThreadTest, QuicDisableTruncatedConnectionIds) {
+ field_trial_group_ = "Enabled";
+ field_trial_params_["enable_truncated_connection_ids"] = "true";
+ ConfigureQuicGlobals();
+ net::HttpNetworkSession::Params params;
+ InitializeNetworkSessionParams(&params);
+ EXPECT_TRUE(params.quic_enable_truncated_connection_ids);
+}
+
TEST_F(IOThreadTest,
AlternateProtocolProbabilityThresholdFromFlag) {
command_line_.AppendSwitchASCII("alternate-protocol-probability-threshold",

Powered by Google App Engine
This is Rietveld 408576698