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

Unified Diff: chrome/browser/io_thread_unittest.cc

Issue 1309363003: Add flag to enable alternative services. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix AboutFlagsHistogramTest.CheckHistograms. Created 5 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: chrome/browser/io_thread_unittest.cc
diff --git a/chrome/browser/io_thread_unittest.cc b/chrome/browser/io_thread_unittest.cc
index 2633f43bbff2306aaa3c0b736b3035668f460e7f..e07d79720e4df36cd7669c3265ec1e4dff08d91d 100644
--- a/chrome/browser/io_thread_unittest.cc
+++ b/chrome/browser/io_thread_unittest.cc
@@ -200,6 +200,27 @@ TEST_F(IOThreadTest, EnableQuicFromCommandLine) {
EXPECT_FALSE(IOThread::ShouldEnableQuicForDataReductionProxy());
}
+TEST_F(IOThreadTest, EnableAlternativeServicesFromCommandLineWithQuicDisabled) {
+ command_line_.AppendSwitch("enable-alternative-services");
+
+ ConfigureQuicGlobals();
+ net::HttpNetworkSession::Params params;
+ InitializeNetworkSessionParams(&params);
+ EXPECT_FALSE(params.enable_quic);
+ EXPECT_TRUE(params.use_alternative_services);
Ryan Hamilton 2015/09/08 17:50:06 Oh, interesting. Is this behavior we're expecting
Bence 2015/09/14 21:56:16 I really do not know. There is nothing QUIC-speci
+}
+
+TEST_F(IOThreadTest, EnableAlternativeServicesFromCommandLineWithQuicEnabled) {
+ command_line_.AppendSwitch("enable-quic");
+ command_line_.AppendSwitch("enable-alternative-services");
+
+ ConfigureQuicGlobals();
+ net::HttpNetworkSession::Params params;
+ InitializeNetworkSessionParams(&params);
+ EXPECT_TRUE(params.enable_quic);
+ EXPECT_TRUE(params.use_alternative_services);
+}
+
TEST_F(IOThreadTest, EnableInsecureQuicFromFieldTrialParams) {
field_trial_group_ = "Enabled";
field_trial_params_["enable_insecure_quic"] = "true";

Powered by Google App Engine
This is Rietveld 408576698