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

Unified Diff: chrome/browser/io_thread_unittest.cc

Issue 1271793003: Create alternative service field trial group. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re: #15. Created 5 years, 4 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 | « 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 87167363f77fd817e0a169da3c37b0f85eac4ce2..2633f43bbff2306aaa3c0b736b3035668f460e7f 100644
--- a/chrome/browser/io_thread_unittest.cc
+++ b/chrome/browser/io_thread_unittest.cc
@@ -97,25 +97,19 @@ TEST_F(IOThreadTest, SpdyFieldTrialHoldbackEnabled) {
}
TEST_F(IOThreadTest, SpdyFieldTrialSpdy31Enabled) {
- bool use_alternative_services = false;
field_trial_group_ = "Spdy31Enabled";
ConfigureSpdyGlobals();
EXPECT_THAT(globals_.next_protos,
ElementsAre(net::kProtoHTTP11,
net::kProtoSPDY31));
- globals_.use_alternative_services.CopyToIfSet(&use_alternative_services);
- EXPECT_TRUE(use_alternative_services);
}
TEST_F(IOThreadTest, SpdyFieldTrialSpdy4Enabled) {
- bool use_alternative_services = false;
field_trial_group_ = "Spdy4Enabled";
ConfigureSpdyGlobals();
EXPECT_THAT(
globals_.next_protos,
ElementsAre(net::kProtoHTTP11, net::kProtoSPDY31, net::kProtoHTTP2));
- globals_.use_alternative_services.CopyToIfSet(&use_alternative_services);
- EXPECT_TRUE(use_alternative_services);
}
TEST_F(IOThreadTest, SpdyFieldTrialDefault) {
@@ -124,9 +118,6 @@ TEST_F(IOThreadTest, SpdyFieldTrialDefault) {
EXPECT_THAT(
globals_.next_protos,
ElementsAre(net::kProtoHTTP11, net::kProtoSPDY31, net::kProtoHTTP2));
- bool use_alternative_services = false;
- globals_.use_alternative_services.CopyToIfSet(&use_alternative_services);
- EXPECT_TRUE(use_alternative_services);
}
TEST_F(IOThreadTest, SpdyFieldTrialParametrized) {
@@ -137,9 +128,6 @@ TEST_F(IOThreadTest, SpdyFieldTrialParametrized) {
ConfigureSpdyGlobals();
EXPECT_THAT(globals_.next_protos,
ElementsAre(net::kProtoHTTP11, net::kProtoHTTP2));
- bool use_alternative_services = false;
- globals_.use_alternative_services.CopyToIfSet(&use_alternative_services);
- EXPECT_TRUE(use_alternative_services);
}
TEST_F(IOThreadTest, SpdyCommandLineUseSpdyOff) {
@@ -181,6 +169,7 @@ TEST_F(IOThreadTest, EnableQuicFromFieldTrialGroup) {
EXPECT_FALSE(params.quic_enable_non_blocking_io);
EXPECT_FALSE(params.quic_disable_disk_cache);
EXPECT_FALSE(params.quic_prefer_aes);
+ EXPECT_FALSE(params.use_alternative_services);
EXPECT_EQ(0, params.quic_max_number_of_lossy_connections);
EXPECT_EQ(1.0f, params.quic_packet_loss_threshold);
EXPECT_FALSE(IOThread::ShouldEnableQuicForDataReductionProxy());
@@ -374,6 +363,16 @@ TEST_F(IOThreadTest, QuicPreferAes) {
EXPECT_TRUE(params.quic_prefer_aes);
}
+TEST_F(IOThreadTest, QuicEnableAlternativeServicesFromFieldTrialParams) {
+ field_trial_group_ = "Enabled";
+ field_trial_params_["use_alternative_services"] = "true";
+
+ ConfigureQuicGlobals();
+ net::HttpNetworkSession::Params params;
+ InitializeNetworkSessionParams(&params);
+ EXPECT_TRUE(params.use_alternative_services);
+}
+
TEST_F(IOThreadTest, QuicMaxNumberOfLossyConnectionsFieldTrialParams) {
field_trial_group_ = "Enabled";
field_trial_params_["max_number_of_lossy_connections"] = "5";
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698