OLD | NEW |
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/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 ConfigureParamsFromFieldTrialsAndCommandLine(); | 341 ConfigureParamsFromFieldTrialsAndCommandLine(); |
342 | 342 |
343 EXPECT_TRUE(params_.enable_quic); | 343 EXPECT_TRUE(params_.enable_quic); |
344 EXPECT_TRUE(params_.enable_quic_alternative_service_with_different_host); | 344 EXPECT_TRUE(params_.enable_quic_alternative_service_with_different_host); |
345 } | 345 } |
346 | 346 |
347 TEST_F(ConfigureParamsFromFieldTrialsAndCommandLineTest, | 347 TEST_F(ConfigureParamsFromFieldTrialsAndCommandLineTest, |
348 QuicVersionFromCommandLine) { | 348 QuicVersionFromCommandLine) { |
349 command_line_.AppendSwitch("enable-quic"); | 349 command_line_.AppendSwitch("enable-quic"); |
350 std::string version = | 350 std::string version = |
351 net::QuicVersionToString(net::QuicSupportedVersions().back()); | 351 net::QuicVersionToString(net::AllSupportedVersions().back()); |
352 command_line_.AppendSwitchASCII("quic-version", version); | 352 command_line_.AppendSwitchASCII("quic-version", version); |
353 | 353 |
354 ConfigureParamsFromFieldTrialsAndCommandLine(); | 354 ConfigureParamsFromFieldTrialsAndCommandLine(); |
355 | 355 |
356 net::QuicVersionVector supported_versions; | 356 net::QuicVersionVector supported_versions; |
357 supported_versions.push_back(net::QuicSupportedVersions().back()); | 357 supported_versions.push_back(net::AllSupportedVersions().back()); |
358 EXPECT_EQ(supported_versions, params_.quic_supported_versions); | 358 EXPECT_EQ(supported_versions, params_.quic_supported_versions); |
359 } | 359 } |
360 | 360 |
361 TEST_F(ConfigureParamsFromFieldTrialsAndCommandLineTest, | 361 TEST_F(ConfigureParamsFromFieldTrialsAndCommandLineTest, |
362 QuicConnectionOptionsFromCommandLine) { | 362 QuicConnectionOptionsFromCommandLine) { |
363 command_line_.AppendSwitch("enable-quic"); | 363 command_line_.AppendSwitch("enable-quic"); |
364 command_line_.AppendSwitchASCII("quic-connection-options", "TIME,TBBR,REJ"); | 364 command_line_.AppendSwitchASCII("quic-connection-options", "TIME,TBBR,REJ"); |
365 | 365 |
366 ConfigureParamsFromFieldTrialsAndCommandLine(); | 366 ConfigureParamsFromFieldTrialsAndCommandLine(); |
367 | 367 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 command_line_.AppendSwitchASCII("testing-fixed-http-port", "42"); | 455 command_line_.AppendSwitchASCII("testing-fixed-http-port", "42"); |
456 command_line_.AppendSwitchASCII("testing-fixed-https-port", "137"); | 456 command_line_.AppendSwitchASCII("testing-fixed-https-port", "137"); |
457 | 457 |
458 ConfigureParamsFromFieldTrialsAndCommandLine(); | 458 ConfigureParamsFromFieldTrialsAndCommandLine(); |
459 | 459 |
460 EXPECT_EQ(42u, params_.testing_fixed_http_port); | 460 EXPECT_EQ(42u, params_.testing_fixed_http_port); |
461 EXPECT_EQ(137u, params_.testing_fixed_https_port); | 461 EXPECT_EQ(137u, params_.testing_fixed_https_port); |
462 } | 462 } |
463 | 463 |
464 } // namespace test | 464 } // namespace test |
OLD | NEW |