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

Side by Side Diff: chrome/browser/io_thread_unittest.cc

Issue 987123002: Advertise HTTP/2 support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/domain_reliability/util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/metrics/field_trial.h" 6 #include "base/metrics/field_trial.h"
7 #include "chrome/browser/io_thread.h" 7 #include "chrome/browser/io_thread.h"
8 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param s.h" 8 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param s.h"
9 #include "net/http/http_network_session.h" 9 #include "net/http/http_network_session.h"
10 #include "net/http/http_server_properties_impl.h" 10 #include "net/http/http_server_properties_impl.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 ElementsAre(net::kProtoHTTP11, 94 ElementsAre(net::kProtoHTTP11,
95 net::kProtoQUIC1SPDY3, 95 net::kProtoQUIC1SPDY3,
96 net::kProtoSPDY31)); 96 net::kProtoSPDY31));
97 globals_.use_alternate_protocols.CopyToIfSet(&use_alternate_protocols); 97 globals_.use_alternate_protocols.CopyToIfSet(&use_alternate_protocols);
98 EXPECT_TRUE(use_alternate_protocols); 98 EXPECT_TRUE(use_alternate_protocols);
99 } 99 }
100 100
101 TEST_F(IOThreadTest, SpdyFieldTrialSpdy4Enabled) { 101 TEST_F(IOThreadTest, SpdyFieldTrialSpdy4Enabled) {
102 bool use_alternate_protocols = false; 102 bool use_alternate_protocols = false;
103 IOThreadPeer::ConfigureSpdyFromTrial("Spdy4Enabled", &globals_); 103 IOThreadPeer::ConfigureSpdyFromTrial("Spdy4Enabled", &globals_);
104 EXPECT_THAT(globals_.next_protos, 104 EXPECT_THAT(
105 ElementsAre(net::kProtoHTTP11, 105 globals_.next_protos,
106 net::kProtoQUIC1SPDY3, 106 ElementsAre(net::kProtoHTTP11, net::kProtoQUIC1SPDY3, net::kProtoSPDY31,
107 net::kProtoSPDY31, 107 net::kProtoSPDY4_14, net::kProtoSPDY4));
108 net::kProtoSPDY4_14));
109 globals_.use_alternate_protocols.CopyToIfSet(&use_alternate_protocols); 108 globals_.use_alternate_protocols.CopyToIfSet(&use_alternate_protocols);
110 EXPECT_TRUE(use_alternate_protocols); 109 EXPECT_TRUE(use_alternate_protocols);
111 } 110 }
112 111
113 TEST_F(IOThreadTest, DisableQuicByDefault) { 112 TEST_F(IOThreadTest, DisableQuicByDefault) {
114 ConfigureQuicGlobals(); 113 ConfigureQuicGlobals();
115 net::HttpNetworkSession::Params params; 114 net::HttpNetworkSession::Params params;
116 InitializeNetworkSessionParams(&params); 115 InitializeNetworkSessionParams(&params);
117 EXPECT_FALSE(params.enable_quic); 116 EXPECT_FALSE(params.enable_quic);
118 EXPECT_FALSE(params.enable_quic_for_proxies); 117 EXPECT_FALSE(params.enable_quic_for_proxies);
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 field_trial_group_ = "Enabled"; 362 field_trial_group_ = "Enabled";
364 field_trial_params_["alternate_protocol_probability_threshold"] = ".5"; 363 field_trial_params_["alternate_protocol_probability_threshold"] = ".5";
365 364
366 ConfigureQuicGlobals(); 365 ConfigureQuicGlobals();
367 net::HttpNetworkSession::Params params; 366 net::HttpNetworkSession::Params params;
368 InitializeNetworkSessionParams(&params); 367 InitializeNetworkSessionParams(&params);
369 EXPECT_EQ(.5, params.alternate_protocol_probability_threshold); 368 EXPECT_EQ(.5, params.alternate_protocol_probability_threshold);
370 } 369 }
371 370
372 } // namespace test 371 } // namespace test
OLDNEW
« no previous file with comments | « no previous file | components/domain_reliability/util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698