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

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

Issue 1613513003: Early connection migration in QUIC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@home
Patch Set: Comments addressed. Created 4 years, 10 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 <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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 EXPECT_FALSE(params.parse_alternative_services); 249 EXPECT_FALSE(params.parse_alternative_services);
250 EXPECT_FALSE(params.enable_alternative_service_with_different_host); 250 EXPECT_FALSE(params.enable_alternative_service_with_different_host);
251 EXPECT_EQ(0, params.quic_max_number_of_lossy_connections); 251 EXPECT_EQ(0, params.quic_max_number_of_lossy_connections);
252 EXPECT_EQ(1.0f, params.quic_packet_loss_threshold); 252 EXPECT_EQ(1.0f, params.quic_packet_loss_threshold);
253 EXPECT_FALSE(params.quic_delay_tcp_race); 253 EXPECT_FALSE(params.quic_delay_tcp_race);
254 EXPECT_FALSE(params.quic_close_sessions_on_ip_change); 254 EXPECT_FALSE(params.quic_close_sessions_on_ip_change);
255 EXPECT_EQ(net::kIdleConnectionTimeoutSeconds, 255 EXPECT_EQ(net::kIdleConnectionTimeoutSeconds,
256 params.quic_idle_connection_timeout_seconds); 256 params.quic_idle_connection_timeout_seconds);
257 EXPECT_FALSE(params.quic_disable_preconnect_if_0rtt); 257 EXPECT_FALSE(params.quic_disable_preconnect_if_0rtt);
258 EXPECT_FALSE(params.quic_migrate_sessions_on_network_change); 258 EXPECT_FALSE(params.quic_migrate_sessions_on_network_change);
259 EXPECT_FALSE(params.quic_migrate_sessions_early);
259 EXPECT_FALSE(IOThread::ShouldEnableQuicForDataReductionProxy()); 260 EXPECT_FALSE(IOThread::ShouldEnableQuicForDataReductionProxy());
260 EXPECT_TRUE(params.quic_host_whitelist.empty()); 261 EXPECT_TRUE(params.quic_host_whitelist.empty());
261 } 262 }
262 263
263 TEST_F(IOThreadTest, 264 TEST_F(IOThreadTest,
264 DisableQuicWhenConnectionTimesOutWithOpenStreamsFromFieldTrialParams) { 265 DisableQuicWhenConnectionTimesOutWithOpenStreamsFromFieldTrialParams) {
265 field_trial_group_ = "Enabled"; 266 field_trial_group_ = "Enabled";
266 field_trial_params_["disable_quic_on_timeout_with_open_streams"] = "true"; 267 field_trial_params_["disable_quic_on_timeout_with_open_streams"] = "true";
267 ConfigureQuicGlobals(); 268 ConfigureQuicGlobals();
268 net::HttpNetworkSession::Params params; 269 net::HttpNetworkSession::Params params;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 406
406 TEST_F(IOThreadTest, QuicMigrateSessionsOnNetworkChangeFromFieldTrialParams) { 407 TEST_F(IOThreadTest, QuicMigrateSessionsOnNetworkChangeFromFieldTrialParams) {
407 field_trial_group_ = "Enabled"; 408 field_trial_group_ = "Enabled";
408 field_trial_params_["migrate_sessions_on_network_change"] = "true"; 409 field_trial_params_["migrate_sessions_on_network_change"] = "true";
409 ConfigureQuicGlobals(); 410 ConfigureQuicGlobals();
410 net::HttpNetworkSession::Params params; 411 net::HttpNetworkSession::Params params;
411 InitializeNetworkSessionParams(&params); 412 InitializeNetworkSessionParams(&params);
412 EXPECT_TRUE(params.quic_migrate_sessions_on_network_change); 413 EXPECT_TRUE(params.quic_migrate_sessions_on_network_change);
413 } 414 }
414 415
416 TEST_F(IOThreadTest, QuicMigrateSessionsEarlyFromFieldTrialParams) {
417 field_trial_group_ = "Enabled";
418 field_trial_params_["migrate_sessions_early"] = "true";
419 ConfigureQuicGlobals();
420 net::HttpNetworkSession::Params params;
421 InitializeNetworkSessionParams(&params);
422 EXPECT_TRUE(params.quic_migrate_sessions_early);
423 }
424
415 TEST_F(IOThreadTest, PacketLengthFromFieldTrialParams) { 425 TEST_F(IOThreadTest, PacketLengthFromFieldTrialParams) {
416 field_trial_group_ = "Enabled"; 426 field_trial_group_ = "Enabled";
417 field_trial_params_["max_packet_length"] = "1450"; 427 field_trial_params_["max_packet_length"] = "1450";
418 428
419 ConfigureQuicGlobals(); 429 ConfigureQuicGlobals();
420 net::HttpNetworkSession::Params params; 430 net::HttpNetworkSession::Params params;
421 InitializeNetworkSessionParams(&params); 431 InitializeNetworkSessionParams(&params);
422 EXPECT_EQ(1450u, params.quic_max_packet_length); 432 EXPECT_EQ(1450u, params.quic_max_packet_length);
423 } 433 }
424 434
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 &IOThreadTestWithIOThreadObject::CheckAuthAndroidNegoitateAccountType, 859 &IOThreadTestWithIOThreadObject::CheckAuthAndroidNegoitateAccountType,
850 base::Unretained(this), "acc1")); 860 base::Unretained(this), "acc1"));
851 pref_service()->SetString(prefs::kAuthAndroidNegotiateAccountType, "acc2"); 861 pref_service()->SetString(prefs::kAuthAndroidNegotiateAccountType, "acc2");
852 RunOnIOThreadBlocking(base::Bind( 862 RunOnIOThreadBlocking(base::Bind(
853 &IOThreadTestWithIOThreadObject::CheckAuthAndroidNegoitateAccountType, 863 &IOThreadTestWithIOThreadObject::CheckAuthAndroidNegoitateAccountType,
854 base::Unretained(this), "acc2")); 864 base::Unretained(this), "acc2"));
855 } 865 }
856 #endif 866 #endif
857 867
858 } // namespace test 868 } // 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