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

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

Issue 551903002: Adds ability to disable connection pooling in QUIC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit addressed. Created 6 years, 3 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') | net/http/http_network_session.h » ('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 "chrome/browser/io_thread.h" 6 #include "chrome/browser/io_thread.h"
7 #include "net/http/http_network_session.h" 7 #include "net/http/http_network_session.h"
8 #include "net/http/http_server_properties_impl.h" 8 #include "net/http/http_server_properties_impl.h"
9 #include "net/quic/quic_protocol.h" 9 #include "net/quic/quic_protocol.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 net::HttpNetworkSession::Params default_params; 126 net::HttpNetworkSession::Params default_params;
127 net::HttpNetworkSession::Params params; 127 net::HttpNetworkSession::Params params;
128 InitializeNetworkSessionParams(&params); 128 InitializeNetworkSessionParams(&params);
129 EXPECT_TRUE(params.enable_quic); 129 EXPECT_TRUE(params.enable_quic);
130 EXPECT_FALSE(params.enable_quic_time_based_loss_detection); 130 EXPECT_FALSE(params.enable_quic_time_based_loss_detection);
131 EXPECT_EQ(1350u, params.quic_max_packet_length); 131 EXPECT_EQ(1350u, params.quic_max_packet_length);
132 EXPECT_EQ(default_params.quic_supported_versions, 132 EXPECT_EQ(default_params.quic_supported_versions,
133 params.quic_supported_versions); 133 params.quic_supported_versions);
134 EXPECT_EQ(net::QuicTagVector(), params.quic_connection_options); 134 EXPECT_EQ(net::QuicTagVector(), params.quic_connection_options);
135 EXPECT_FALSE(params.quic_always_require_handshake_confirmation); 135 EXPECT_FALSE(params.quic_always_require_handshake_confirmation);
136 EXPECT_FALSE(params.quic_disable_connection_pooling);
136 } 137 }
137 138
138 TEST_F(IOThreadTest, EnableQuicFromCommandLine) { 139 TEST_F(IOThreadTest, EnableQuicFromCommandLine) {
139 base::CommandLine::StringVector args; 140 base::CommandLine::StringVector args;
140 command_line_.AppendSwitch("enable-quic"); 141 command_line_.AppendSwitch("enable-quic");
141 142
142 ConfigureQuicGlobals(); 143 ConfigureQuicGlobals();
143 net::HttpNetworkSession::Params params; 144 net::HttpNetworkSession::Params params;
144 InitializeNetworkSessionParams(&params); 145 InitializeNetworkSessionParams(&params);
145 EXPECT_TRUE(params.enable_quic); 146 EXPECT_TRUE(params.enable_quic);
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 TEST_F(IOThreadTest, 325 TEST_F(IOThreadTest,
325 QuicAlwaysRequireHandshakeConfirmationFromFieldTrialParams) { 326 QuicAlwaysRequireHandshakeConfirmationFromFieldTrialParams) {
326 field_trial_group_ = "Enabled"; 327 field_trial_group_ = "Enabled";
327 field_trial_params_["always_require_handshake_confirmation"] = "true"; 328 field_trial_params_["always_require_handshake_confirmation"] = "true";
328 ConfigureQuicGlobals(); 329 ConfigureQuicGlobals();
329 net::HttpNetworkSession::Params params; 330 net::HttpNetworkSession::Params params;
330 InitializeNetworkSessionParams(&params); 331 InitializeNetworkSessionParams(&params);
331 EXPECT_TRUE(params.quic_always_require_handshake_confirmation); 332 EXPECT_TRUE(params.quic_always_require_handshake_confirmation);
332 } 333 }
333 334
335 TEST_F(IOThreadTest,
336 QuicDisableConnectionPoolingFromFieldTrialParams) {
337 field_trial_group_ = "Enabled";
338 field_trial_params_["disable_connection_pooling"] = "true";
339 ConfigureQuicGlobals();
340 net::HttpNetworkSession::Params params;
341 InitializeNetworkSessionParams(&params);
342 EXPECT_TRUE(params.quic_disable_connection_pooling);
343 }
344
334 } // namespace test 345 } // namespace test
OLDNEW
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | net/http/http_network_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698