| OLD | NEW |
| 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 22 matching lines...) Expand all Loading... |
| 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," | 42 "\"delay_tcp_race\":true," |
| 43 "\"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," | |
| 47 "\"idle_connection_timeout_seconds\":300," | 45 "\"idle_connection_timeout_seconds\":300," |
| 48 "\"close_sessions_on_ip_change\":true," | 46 "\"close_sessions_on_ip_change\":true," |
| 49 "\"race_cert_verification\":true," | 47 "\"race_cert_verification\":true," |
| 50 "\"connection_options\":\"TIME,TBBR,REJ\"}," | 48 "\"connection_options\":\"TIME,TBBR,REJ\"}," |
| 51 "\"AsyncDNS\":{\"enable\":true}," | 49 "\"AsyncDNS\":{\"enable\":true}," |
| 52 "\"HostResolverRules\":{\"host_resolver_rules\":" | 50 "\"HostResolverRules\":{\"host_resolver_rules\":" |
| 53 "\"MAP * 127.0.0.1\"}}", | 51 "\"MAP * 127.0.0.1\"}}", |
| 54 // Data reduction proxy key. | 52 // Data reduction proxy key. |
| 55 "", | 53 "", |
| 56 // Data reduction proxy. | 54 // Data reduction proxy. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 88 |
| 91 // Check max_server_configs_stored_in_properties. | 89 // Check max_server_configs_stored_in_properties. |
| 92 EXPECT_EQ(2u, params->quic_max_server_configs_stored_in_properties); | 90 EXPECT_EQ(2u, params->quic_max_server_configs_stored_in_properties); |
| 93 | 91 |
| 94 // Check delay_tcp_race. | 92 // Check delay_tcp_race. |
| 95 EXPECT_TRUE(params->quic_delay_tcp_race); | 93 EXPECT_TRUE(params->quic_delay_tcp_race); |
| 96 | 94 |
| 97 // Check prefer_aes. | 95 // Check prefer_aes. |
| 98 EXPECT_TRUE(params->quic_prefer_aes); | 96 EXPECT_TRUE(params->quic_prefer_aes); |
| 99 | 97 |
| 100 // Check max_number_of_lossy_connections and packet_loss_threshold. | |
| 101 EXPECT_EQ(10, params->quic_max_number_of_lossy_connections); | |
| 102 EXPECT_FLOAT_EQ(0.5f, params->quic_packet_loss_threshold); | |
| 103 | |
| 104 // Check idle_connection_timeout_seconds. | 98 // Check idle_connection_timeout_seconds. |
| 105 EXPECT_EQ(300, params->quic_idle_connection_timeout_seconds); | 99 EXPECT_EQ(300, params->quic_idle_connection_timeout_seconds); |
| 106 | 100 |
| 107 EXPECT_TRUE(params->quic_close_sessions_on_ip_change); | 101 EXPECT_TRUE(params->quic_close_sessions_on_ip_change); |
| 108 EXPECT_FALSE(params->quic_migrate_sessions_on_network_change); | 102 EXPECT_FALSE(params->quic_migrate_sessions_on_network_change); |
| 109 | 103 |
| 110 // Check race_cert_verification. | 104 // Check race_cert_verification. |
| 111 EXPECT_TRUE(params->quic_race_cert_verification); | 105 EXPECT_TRUE(params->quic_race_cert_verification); |
| 112 | 106 |
| 113 // Check AsyncDNS resolver is enabled. | 107 // Check AsyncDNS resolver is enabled. |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 context->GetNetworkSessionParams(); | 166 context->GetNetworkSessionParams(); |
| 173 | 167 |
| 174 EXPECT_FALSE(params->quic_close_sessions_on_ip_change); | 168 EXPECT_FALSE(params->quic_close_sessions_on_ip_change); |
| 175 EXPECT_TRUE(params->quic_migrate_sessions_on_network_change); | 169 EXPECT_TRUE(params->quic_migrate_sessions_on_network_change); |
| 176 EXPECT_TRUE(params->quic_migrate_sessions_early); | 170 EXPECT_TRUE(params->quic_migrate_sessions_early); |
| 177 } | 171 } |
| 178 | 172 |
| 179 // See stale_host_resolver_unittest.cc for test of StaleDNS options. | 173 // See stale_host_resolver_unittest.cc for test of StaleDNS options. |
| 180 | 174 |
| 181 } // namespace cronet | 175 } // namespace cronet |
| OLD | NEW |