| 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 "net/cert/cert_verifier.h" | 7 #include "net/cert/cert_verifier.h" |
| 8 #include "net/http/http_network_session.h" | 8 #include "net/http/http_network_session.h" |
| 9 #include "net/proxy/proxy_config.h" | 9 #include "net/proxy/proxy_config.h" |
| 10 #include "net/proxy/proxy_config_service_fixed.h" | 10 #include "net/proxy/proxy_config_service_fixed.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // Max size of http cache in bytes. | 27 // Max size of http cache in bytes. |
| 28 1024000, | 28 1024000, |
| 29 // Disable caching for HTTP responses. Other information may be stored in | 29 // Disable caching for HTTP responses. Other information may be stored in |
| 30 // the cache. | 30 // the cache. |
| 31 false, | 31 false, |
| 32 // Storage path for http cache and cookie storage. | 32 // Storage path for http cache and cookie storage. |
| 33 "/data/data/org.chromium.net/app_cronet_test/test_storage", | 33 "/data/data/org.chromium.net/app_cronet_test/test_storage", |
| 34 // User-Agent request header field. | 34 // User-Agent request header field. |
| 35 "fake agent", | 35 "fake agent", |
| 36 // JSON encoded experimental options. | 36 // JSON encoded experimental options. |
| 37 "{\"QUIC\":{\"store_server_configs_in_properties\":true," | 37 "{\"QUIC\":{\"number_of_server_configs_stored_in_properties\":2," |
| 38 "\"delay_tcp_race\":true," | 38 "\"delay_tcp_race\":true," |
| 39 "\"max_number_of_lossy_connections\":10," | 39 "\"max_number_of_lossy_connections\":10," |
| 40 "\"packet_loss_threshold\":0.5," | 40 "\"packet_loss_threshold\":0.5," |
| 41 "\"idle_connection_timeout_seconds\":300," | 41 "\"idle_connection_timeout_seconds\":300," |
| 42 "\"connection_options\":\"TIME,TBBR,REJ\"}," | 42 "\"connection_options\":\"TIME,TBBR,REJ\"}," |
| 43 "\"AsyncDNS\":{\"enable\":true}}", | 43 "\"AsyncDNS\":{\"enable\":true}}", |
| 44 // Data reduction proxy key. | 44 // Data reduction proxy key. |
| 45 "", | 45 "", |
| 46 // Data reduction proxy. | 46 // Data reduction proxy. |
| 47 "", | 47 "", |
| (...skipping 13 matching lines...) Expand all Loading... |
| 61 scoped_ptr<net::URLRequestContext> context(builder.Build()); | 61 scoped_ptr<net::URLRequestContext> context(builder.Build()); |
| 62 const net::HttpNetworkSession::Params* params = | 62 const net::HttpNetworkSession::Params* params = |
| 63 context->GetNetworkSessionParams(); | 63 context->GetNetworkSessionParams(); |
| 64 // Check Quic Connection options. | 64 // Check Quic Connection options. |
| 65 net::QuicTagVector quic_connection_options; | 65 net::QuicTagVector quic_connection_options; |
| 66 quic_connection_options.push_back(net::kTIME); | 66 quic_connection_options.push_back(net::kTIME); |
| 67 quic_connection_options.push_back(net::kTBBR); | 67 quic_connection_options.push_back(net::kTBBR); |
| 68 quic_connection_options.push_back(net::kREJ); | 68 quic_connection_options.push_back(net::kREJ); |
| 69 EXPECT_EQ(quic_connection_options, params->quic_connection_options); | 69 EXPECT_EQ(quic_connection_options, params->quic_connection_options); |
| 70 | 70 |
| 71 // Check store_server_configs_in_properties. | 71 // Check number_of_server_configs_stored_in_properties. |
| 72 EXPECT_TRUE(params->quic_store_server_configs_in_properties); | 72 EXPECT_EQ(2, params->quic_number_of_server_configs_stored_in_properties); |
| 73 | 73 |
| 74 // Check delay_tcp_race. | 74 // Check delay_tcp_race. |
| 75 EXPECT_TRUE(params->quic_delay_tcp_race); | 75 EXPECT_TRUE(params->quic_delay_tcp_race); |
| 76 | 76 |
| 77 // Check max_number_of_lossy_connections and packet_loss_threshold. | 77 // Check max_number_of_lossy_connections and packet_loss_threshold. |
| 78 EXPECT_EQ(10, params->quic_max_number_of_lossy_connections); | 78 EXPECT_EQ(10, params->quic_max_number_of_lossy_connections); |
| 79 EXPECT_FLOAT_EQ(0.5f, params->quic_packet_loss_threshold); | 79 EXPECT_FLOAT_EQ(0.5f, params->quic_packet_loss_threshold); |
| 80 | 80 |
| 81 // Check idle_connection_timeout_seconds. | 81 // Check idle_connection_timeout_seconds. |
| 82 EXPECT_EQ(300, params->quic_idle_connection_timeout_seconds); | 82 EXPECT_EQ(300, params->quic_idle_connection_timeout_seconds); |
| 83 | 83 |
| 84 // Check AsyncDNS resolver is enabled. | 84 // Check AsyncDNS resolver is enabled. |
| 85 EXPECT_NE(nullptr, context->host_resolver()->GetDnsConfigAsValue()); | 85 EXPECT_NE(nullptr, context->host_resolver()->GetDnsConfigAsValue()); |
| 86 } | 86 } |
| 87 | 87 |
| 88 } // namespace cronet | 88 } // namespace cronet |
| OLD | NEW |