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

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

Issue 1916783003: QUIC - enable "delay_tcp_race" parameter by default. This feature showed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Deleted unneeded hanging get calls from unittests Created 4 years, 7 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
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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 EXPECT_FALSE(params_.quic_disable_connection_pooling); 248 EXPECT_FALSE(params_.quic_disable_connection_pooling);
249 EXPECT_EQ(0.25f, params_.quic_load_server_info_timeout_srtt_multiplier); 249 EXPECT_EQ(0.25f, params_.quic_load_server_info_timeout_srtt_multiplier);
250 EXPECT_FALSE(params_.quic_enable_connection_racing); 250 EXPECT_FALSE(params_.quic_enable_connection_racing);
251 EXPECT_FALSE(params_.quic_enable_non_blocking_io); 251 EXPECT_FALSE(params_.quic_enable_non_blocking_io);
252 EXPECT_FALSE(params_.quic_disable_disk_cache); 252 EXPECT_FALSE(params_.quic_disable_disk_cache);
253 EXPECT_FALSE(params_.quic_prefer_aes); 253 EXPECT_FALSE(params_.quic_prefer_aes);
254 EXPECT_FALSE(params_.parse_alternative_services); 254 EXPECT_FALSE(params_.parse_alternative_services);
255 EXPECT_FALSE(params_.enable_alternative_service_with_different_host); 255 EXPECT_FALSE(params_.enable_alternative_service_with_different_host);
256 EXPECT_EQ(0, params_.quic_max_number_of_lossy_connections); 256 EXPECT_EQ(0, params_.quic_max_number_of_lossy_connections);
257 EXPECT_EQ(1.0f, params_.quic_packet_loss_threshold); 257 EXPECT_EQ(1.0f, params_.quic_packet_loss_threshold);
258 EXPECT_FALSE(params_.quic_delay_tcp_race);
259 EXPECT_FALSE(params_.quic_close_sessions_on_ip_change); 258 EXPECT_FALSE(params_.quic_close_sessions_on_ip_change);
260 EXPECT_EQ(net::kIdleConnectionTimeoutSeconds, 259 EXPECT_EQ(net::kIdleConnectionTimeoutSeconds,
261 params_.quic_idle_connection_timeout_seconds); 260 params_.quic_idle_connection_timeout_seconds);
262 EXPECT_FALSE(params_.quic_disable_preconnect_if_0rtt); 261 EXPECT_FALSE(params_.quic_disable_preconnect_if_0rtt);
263 EXPECT_FALSE(params_.quic_migrate_sessions_on_network_change); 262 EXPECT_FALSE(params_.quic_migrate_sessions_on_network_change);
264 EXPECT_FALSE(params_.quic_migrate_sessions_early); 263 EXPECT_FALSE(params_.quic_migrate_sessions_early);
265 EXPECT_FALSE(IOThread::ShouldEnableQuicForDataReductionProxy()); 264 EXPECT_FALSE(IOThread::ShouldEnableQuicForDataReductionProxy());
266 EXPECT_TRUE(params_.quic_host_whitelist.empty()); 265 EXPECT_TRUE(params_.quic_host_whitelist.empty());
267 266
268 net::HttpNetworkSession::Params default_params; 267 net::HttpNetworkSession::Params default_params;
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 std::map<std::string, std::string> field_trial_params; 619 std::map<std::string, std::string> field_trial_params;
621 field_trial_params["receive_buffer_size"] = "2097152"; 620 field_trial_params["receive_buffer_size"] = "2097152";
622 variations::AssociateVariationParams("QUIC", "Enabled", field_trial_params); 621 variations::AssociateVariationParams("QUIC", "Enabled", field_trial_params);
623 base::FieldTrialList::CreateFieldTrial("QUIC", "Enabled"); 622 base::FieldTrialList::CreateFieldTrial("QUIC", "Enabled");
624 623
625 ParseFieldTrials(); 624 ParseFieldTrials();
626 625
627 EXPECT_EQ(2097152, params_.quic_socket_receive_buffer_size); 626 EXPECT_EQ(2097152, params_.quic_socket_receive_buffer_size);
628 } 627 }
629 628
630 TEST_F(NetworkSessionConfiguratorTest, QuicDelayTcpConnection) {
631 std::map<std::string, std::string> field_trial_params;
632 field_trial_params["delay_tcp_race"] = "true";
633 variations::AssociateVariationParams("QUIC", "Enabled", field_trial_params);
634 base::FieldTrialList::CreateFieldTrial("QUIC", "Enabled");
635
636 ParseFieldTrials();
637
638 EXPECT_TRUE(params_.quic_delay_tcp_race);
639 }
640
641 TEST_F(NetworkSessionConfiguratorTest, QuicOriginsToForceQuicOn) { 629 TEST_F(NetworkSessionConfiguratorTest, QuicOriginsToForceQuicOn) {
642 base::CommandLine::ForCurrentProcess()->AppendSwitch("enable-quic"); 630 base::CommandLine::ForCurrentProcess()->AppendSwitch("enable-quic");
643 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( 631 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
644 "origin-to-force-quic-on", "www.example.com:443, www.example.org:443"); 632 "origin-to-force-quic-on", "www.example.com:443, www.example.org:443");
645 633
646 ParseFieldTrialsAndCommandLine(); 634 ParseFieldTrialsAndCommandLine();
647 635
648 EXPECT_EQ(2u, params_.origins_to_force_quic_on.size()); 636 EXPECT_EQ(2u, params_.origins_to_force_quic_on.size());
649 EXPECT_TRUE( 637 EXPECT_TRUE(
650 ContainsKey(params_.origins_to_force_quic_on, 638 ContainsKey(params_.origins_to_force_quic_on,
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 &IOThreadTestWithIOThreadObject::CheckAuthAndroidNegoitateAccountType, 864 &IOThreadTestWithIOThreadObject::CheckAuthAndroidNegoitateAccountType,
877 base::Unretained(this), "acc1")); 865 base::Unretained(this), "acc1"));
878 pref_service()->SetString(prefs::kAuthAndroidNegotiateAccountType, "acc2"); 866 pref_service()->SetString(prefs::kAuthAndroidNegotiateAccountType, "acc2");
879 RunOnIOThreadBlocking(base::Bind( 867 RunOnIOThreadBlocking(base::Bind(
880 &IOThreadTestWithIOThreadObject::CheckAuthAndroidNegoitateAccountType, 868 &IOThreadTestWithIOThreadObject::CheckAuthAndroidNegoitateAccountType,
881 base::Unretained(this), "acc2")); 869 base::Unretained(this), "acc2"));
882 } 870 }
883 #endif 871 #endif
884 872
885 } // namespace test 873 } // namespace test
OLDNEW
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | components/cronet/android/test/javatests/src/org/chromium/net/QuicTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698