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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 | 596 |
597 TEST_F(IOThreadTest, QuicDelayTcpConnection) { | 597 TEST_F(IOThreadTest, QuicDelayTcpConnection) { |
598 field_trial_group_ = "Enabled"; | 598 field_trial_group_ = "Enabled"; |
599 field_trial_params_["delay_tcp_race"] = "true"; | 599 field_trial_params_["delay_tcp_race"] = "true"; |
600 ConfigureQuicGlobals(); | 600 ConfigureQuicGlobals(); |
601 net::HttpNetworkSession::Params params; | 601 net::HttpNetworkSession::Params params; |
602 InitializeNetworkSessionParams(¶ms); | 602 InitializeNetworkSessionParams(¶ms); |
603 EXPECT_TRUE(params.quic_delay_tcp_race); | 603 EXPECT_TRUE(params.quic_delay_tcp_race); |
604 } | 604 } |
605 | 605 |
| 606 TEST_F(IOThreadTest, QuicOriginsToForceQuicOn) { |
| 607 command_line_.AppendSwitch("enable-quic"); |
| 608 command_line_.AppendSwitchASCII("origin-to-force-quic-on", |
| 609 "www.example.com:443, www.example.org:443"); |
| 610 |
| 611 ConfigureQuicGlobals(); |
| 612 net::HttpNetworkSession::Params params; |
| 613 InitializeNetworkSessionParams(¶ms); |
| 614 EXPECT_EQ(2u, params.origins_to_force_quic_on.size()); |
| 615 EXPECT_TRUE( |
| 616 ContainsKey(params.origins_to_force_quic_on, |
| 617 net::HostPortPair::FromString("www.example.com:443"))); |
| 618 EXPECT_TRUE( |
| 619 ContainsKey(params.origins_to_force_quic_on, |
| 620 net::HostPortPair::FromString("www.example.org:443"))); |
| 621 } |
| 622 |
606 TEST_F(IOThreadTest, QuicWhitelistFromCommandLinet) { | 623 TEST_F(IOThreadTest, QuicWhitelistFromCommandLinet) { |
607 command_line_.AppendSwitch("enable-quic"); | 624 command_line_.AppendSwitch("enable-quic"); |
608 command_line_.AppendSwitchASCII("quic-host-whitelist", | 625 command_line_.AppendSwitchASCII("quic-host-whitelist", |
609 "www.example.org, www.example.com"); | 626 "www.example.org, www.example.com"); |
610 | 627 |
611 ConfigureQuicGlobals(); | 628 ConfigureQuicGlobals(); |
612 net::HttpNetworkSession::Params params; | 629 net::HttpNetworkSession::Params params; |
613 InitializeNetworkSessionParams(¶ms); | 630 InitializeNetworkSessionParams(¶ms); |
614 EXPECT_EQ(2u, params.quic_host_whitelist.size()); | 631 EXPECT_EQ(2u, params.quic_host_whitelist.size()); |
615 EXPECT_TRUE(ContainsKey(params.quic_host_whitelist, "www.example.org")); | 632 EXPECT_TRUE(ContainsKey(params.quic_host_whitelist, "www.example.org")); |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
819 &IOThreadTestWithIOThreadObject::CheckAuthAndroidNegoitateAccountType, | 836 &IOThreadTestWithIOThreadObject::CheckAuthAndroidNegoitateAccountType, |
820 base::Unretained(this), "acc1")); | 837 base::Unretained(this), "acc1")); |
821 pref_service()->SetString(prefs::kAuthAndroidNegotiateAccountType, "acc2"); | 838 pref_service()->SetString(prefs::kAuthAndroidNegotiateAccountType, "acc2"); |
822 RunOnIOThreadBlocking(base::Bind( | 839 RunOnIOThreadBlocking(base::Bind( |
823 &IOThreadTestWithIOThreadObject::CheckAuthAndroidNegoitateAccountType, | 840 &IOThreadTestWithIOThreadObject::CheckAuthAndroidNegoitateAccountType, |
824 base::Unretained(this), "acc2")); | 841 base::Unretained(this), "acc2")); |
825 } | 842 } |
826 #endif | 843 #endif |
827 | 844 |
828 } // namespace test | 845 } // namespace test |
OLD | NEW |