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

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

Issue 1808303005: QUIC - extend origin-to-force-quic-on command line option to accept list (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed comments for Patch Set 1 Created 4 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 | « chrome/browser/io_thread.cc ('k') | chrome/browser/resources/net_internals/quic_view.html » ('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/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(&params); 602 InitializeNetworkSessionParams(&params);
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(&params);
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(&params); 630 InitializeNetworkSessionParams(&params);
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
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
OLDNEW
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chrome/browser/resources/net_internals/quic_view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698