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

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

Issue 2822053002: Remove unused "Disable remote Alt-Svc" QUIC experiment code. (Closed)
Patch Set: network_session_configurator_unittest.cc Created 3 years, 8 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/network_session_configurator/network_session_configurator.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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 base::CommandLine command_line_; 264 base::CommandLine command_line_;
265 bool is_quic_allowed_by_policy_; 265 bool is_quic_allowed_by_policy_;
266 net::HttpNetworkSession::Params params_; 266 net::HttpNetworkSession::Params params_;
267 }; 267 };
268 268
269 TEST_F(ConfigureParamsFromFieldTrialsAndCommandLineTest, Default) { 269 TEST_F(ConfigureParamsFromFieldTrialsAndCommandLineTest, Default) {
270 ConfigureParamsFromFieldTrialsAndCommandLine(); 270 ConfigureParamsFromFieldTrialsAndCommandLine();
271 271
272 EXPECT_TRUE(params_.enable_http2); 272 EXPECT_TRUE(params_.enable_http2);
273 EXPECT_FALSE(params_.enable_quic); 273 EXPECT_FALSE(params_.enable_quic);
274 EXPECT_TRUE(params_.enable_quic_alternative_service_with_different_host);
275 EXPECT_EQ(1350u, params_.quic_max_packet_length); 274 EXPECT_EQ(1350u, params_.quic_max_packet_length);
276 EXPECT_EQ(net::QuicTagVector(), params_.quic_connection_options); 275 EXPECT_EQ(net::QuicTagVector(), params_.quic_connection_options);
277 EXPECT_TRUE(params_.origins_to_force_quic_on.empty()); 276 EXPECT_TRUE(params_.origins_to_force_quic_on.empty());
278 EXPECT_FALSE(params_.enable_user_alternate_protocol_ports); 277 EXPECT_FALSE(params_.enable_user_alternate_protocol_ports);
279 EXPECT_FALSE(params_.ignore_certificate_errors); 278 EXPECT_FALSE(params_.ignore_certificate_errors);
280 EXPECT_EQ(0, params_.testing_fixed_http_port); 279 EXPECT_EQ(0, params_.testing_fixed_http_port);
281 EXPECT_EQ(0, params_.testing_fixed_https_port); 280 EXPECT_EQ(0, params_.testing_fixed_https_port);
282 } 281 }
283 282
284 TEST_F(ConfigureParamsFromFieldTrialsAndCommandLineTest, 283 TEST_F(ConfigureParamsFromFieldTrialsAndCommandLineTest,
(...skipping 30 matching lines...) Expand all
315 TEST_F(ConfigureParamsFromFieldTrialsAndCommandLineTest, 314 TEST_F(ConfigureParamsFromFieldTrialsAndCommandLineTest,
316 EnableQuicFromCommandLine) { 315 EnableQuicFromCommandLine) {
317 command_line_.AppendSwitch("enable-quic"); 316 command_line_.AppendSwitch("enable-quic");
318 317
319 ConfigureParamsFromFieldTrialsAndCommandLine(); 318 ConfigureParamsFromFieldTrialsAndCommandLine();
320 319
321 EXPECT_TRUE(params_.enable_quic); 320 EXPECT_TRUE(params_.enable_quic);
322 } 321 }
323 322
324 TEST_F(ConfigureParamsFromFieldTrialsAndCommandLineTest, 323 TEST_F(ConfigureParamsFromFieldTrialsAndCommandLineTest,
325 EnableAlternativeServicesFromCommandLineWithQuicDisabled) {
326 command_line_.AppendSwitch("enable-alternative-services");
327
328 ConfigureParamsFromFieldTrialsAndCommandLine();
329
330 EXPECT_FALSE(params_.enable_quic);
331 EXPECT_TRUE(params_.enable_quic_alternative_service_with_different_host);
332 }
333
334 TEST_F(ConfigureParamsFromFieldTrialsAndCommandLineTest,
335 EnableAlternativeServicesFromCommandLineWithQuicEnabled) {
336 command_line_.AppendSwitch("enable-quic");
337 command_line_.AppendSwitch("enable-alternative-services");
338
339 ConfigureParamsFromFieldTrialsAndCommandLine();
340
341 EXPECT_TRUE(params_.enable_quic);
342 EXPECT_TRUE(params_.enable_quic_alternative_service_with_different_host);
343 }
344
345 TEST_F(ConfigureParamsFromFieldTrialsAndCommandLineTest,
346 QuicVersionFromCommandLine) { 324 QuicVersionFromCommandLine) {
347 command_line_.AppendSwitch("enable-quic"); 325 command_line_.AppendSwitch("enable-quic");
348 std::string version = 326 std::string version =
349 net::QuicVersionToString(net::AllSupportedVersions().back()); 327 net::QuicVersionToString(net::AllSupportedVersions().back());
350 command_line_.AppendSwitchASCII("quic-version", version); 328 command_line_.AppendSwitchASCII("quic-version", version);
351 329
352 ConfigureParamsFromFieldTrialsAndCommandLine(); 330 ConfigureParamsFromFieldTrialsAndCommandLine();
353 331
354 net::QuicVersionVector supported_versions; 332 net::QuicVersionVector supported_versions;
355 supported_versions.push_back(net::AllSupportedVersions().back()); 333 supported_versions.push_back(net::AllSupportedVersions().back());
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 command_line_.AppendSwitchASCII("testing-fixed-http-port", "42"); 418 command_line_.AppendSwitchASCII("testing-fixed-http-port", "42");
441 command_line_.AppendSwitchASCII("testing-fixed-https-port", "137"); 419 command_line_.AppendSwitchASCII("testing-fixed-https-port", "137");
442 420
443 ConfigureParamsFromFieldTrialsAndCommandLine(); 421 ConfigureParamsFromFieldTrialsAndCommandLine();
444 422
445 EXPECT_EQ(42u, params_.testing_fixed_http_port); 423 EXPECT_EQ(42u, params_.testing_fixed_http_port);
446 EXPECT_EQ(137u, params_.testing_fixed_https_port); 424 EXPECT_EQ(137u, params_.testing_fixed_https_port);
447 } 425 }
448 426
449 } // namespace test 427 } // namespace test
OLDNEW
« no previous file with comments | « no previous file | components/network_session_configurator/network_session_configurator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698