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

Side by Side Diff: components/cronet/url_request_context_config_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/cronet/url_request_context_config.h" 5 #include "components/cronet/url_request_context_config.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "net/cert/cert_verifier.h" 9 #include "net/cert/cert_verifier.h"
10 #include "net/http/http_network_session.h" 10 #include "net/http/http_network_session.h"
(...skipping 21 matching lines...) Expand all
32 1024000, 32 1024000,
33 // Disable caching for HTTP responses. Other information may be stored in 33 // Disable caching for HTTP responses. Other information may be stored in
34 // the cache. 34 // the cache.
35 false, 35 false,
36 // Storage path for http cache and cookie storage. 36 // Storage path for http cache and cookie storage.
37 "/data/data/org.chromium.net/app_cronet_test/test_storage", 37 "/data/data/org.chromium.net/app_cronet_test/test_storage",
38 // User-Agent request header field. 38 // User-Agent request header field.
39 "fake agent", 39 "fake agent",
40 // JSON encoded experimental options. 40 // JSON encoded experimental options.
41 "{\"QUIC\":{\"max_server_configs_stored_in_properties\":2," 41 "{\"QUIC\":{\"max_server_configs_stored_in_properties\":2,"
42 "\"delay_tcp_race\":true,"
43 "\"max_number_of_lossy_connections\":10," 42 "\"max_number_of_lossy_connections\":10,"
44 "\"prefer_aes\":true," 43 "\"prefer_aes\":true,"
45 "\"user_agent_id\":\"Custom QUIC UAID\"," 44 "\"user_agent_id\":\"Custom QUIC UAID\","
46 "\"packet_loss_threshold\":0.5," 45 "\"packet_loss_threshold\":0.5,"
47 "\"idle_connection_timeout_seconds\":300," 46 "\"idle_connection_timeout_seconds\":300,"
48 "\"close_sessions_on_ip_change\":true," 47 "\"close_sessions_on_ip_change\":true,"
49 "\"connection_options\":\"TIME,TBBR,REJ\"}," 48 "\"connection_options\":\"TIME,TBBR,REJ\"},"
50 "\"AsyncDNS\":{\"enable\":true}}", 49 "\"AsyncDNS\":{\"enable\":true}}",
51 // Data reduction proxy key. 50 // Data reduction proxy key.
52 "", 51 "",
(...skipping 21 matching lines...) Expand all
74 quic_connection_options.push_back(net::kTBBR); 73 quic_connection_options.push_back(net::kTBBR);
75 quic_connection_options.push_back(net::kREJ); 74 quic_connection_options.push_back(net::kREJ);
76 EXPECT_EQ(quic_connection_options, params->quic_connection_options); 75 EXPECT_EQ(quic_connection_options, params->quic_connection_options);
77 76
78 // Check Custom QUIC User Agent Id. 77 // Check Custom QUIC User Agent Id.
79 EXPECT_EQ("Custom QUIC UAID", params->quic_user_agent_id); 78 EXPECT_EQ("Custom QUIC UAID", params->quic_user_agent_id);
80 79
81 // Check max_server_configs_stored_in_properties. 80 // Check max_server_configs_stored_in_properties.
82 EXPECT_EQ(2u, params->quic_max_server_configs_stored_in_properties); 81 EXPECT_EQ(2u, params->quic_max_server_configs_stored_in_properties);
83 82
84 // Check delay_tcp_race.
85 EXPECT_TRUE(params->quic_delay_tcp_race);
86
87 // Check prefer_aes. 83 // Check prefer_aes.
88 EXPECT_TRUE(params->quic_prefer_aes); 84 EXPECT_TRUE(params->quic_prefer_aes);
89 85
90 // Check max_number_of_lossy_connections and packet_loss_threshold. 86 // Check max_number_of_lossy_connections and packet_loss_threshold.
91 EXPECT_EQ(10, params->quic_max_number_of_lossy_connections); 87 EXPECT_EQ(10, params->quic_max_number_of_lossy_connections);
92 EXPECT_FLOAT_EQ(0.5f, params->quic_packet_loss_threshold); 88 EXPECT_FLOAT_EQ(0.5f, params->quic_packet_loss_threshold);
93 89
94 // Check idle_connection_timeout_seconds. 90 // Check idle_connection_timeout_seconds.
95 EXPECT_EQ(300, params->quic_idle_connection_timeout_seconds); 91 EXPECT_EQ(300, params->quic_idle_connection_timeout_seconds);
96 92
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 std::unique_ptr<net::URLRequestContext> context(builder.Build()); 141 std::unique_ptr<net::URLRequestContext> context(builder.Build());
146 const net::HttpNetworkSession::Params* params = 142 const net::HttpNetworkSession::Params* params =
147 context->GetNetworkSessionParams(); 143 context->GetNetworkSessionParams();
148 144
149 EXPECT_FALSE(params->quic_close_sessions_on_ip_change); 145 EXPECT_FALSE(params->quic_close_sessions_on_ip_change);
150 EXPECT_TRUE(params->quic_migrate_sessions_on_network_change); 146 EXPECT_TRUE(params->quic_migrate_sessions_on_network_change);
151 EXPECT_TRUE(params->quic_migrate_sessions_early); 147 EXPECT_TRUE(params->quic_migrate_sessions_early);
152 } 148 }
153 149
154 } // namespace cronet 150 } // namespace cronet
OLDNEW
« no previous file with comments | « components/cronet/url_request_context_config.cc ('k') | ios/chrome/browser/ios_chrome_io_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698