| 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/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "net/cert/cert_verifier.h" | 10 #include "net/cert/cert_verifier.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 TEST(URLRequestContextConfigTest, TestExperimentalOptionParsing) { | 22 TEST(URLRequestContextConfigTest, TestExperimentalOptionParsing) { |
| 23 URLRequestContextConfig config( | 23 URLRequestContextConfig config( |
| 24 // Enable QUIC. | 24 // Enable QUIC. |
| 25 true, | 25 true, |
| 26 // QUIC User Agent ID. | 26 // QUIC User Agent ID. |
| 27 "Default QUIC User Agent ID", | 27 "Default QUIC User Agent ID", |
| 28 // Enable SPDY. | 28 // Enable SPDY. |
| 29 true, | 29 true, |
| 30 // Enable SDCH. | 30 // Enable SDCH. |
| 31 false, | 31 false, |
| 32 // Enable Brotli. |
| 33 false, |
| 32 // Type of http cache. | 34 // Type of http cache. |
| 33 URLRequestContextConfig::HttpCacheType::DISK, | 35 URLRequestContextConfig::HttpCacheType::DISK, |
| 34 // Max size of http cache in bytes. | 36 // Max size of http cache in bytes. |
| 35 1024000, | 37 1024000, |
| 36 // Disable caching for HTTP responses. Other information may be stored in | 38 // Disable caching for HTTP responses. Other information may be stored in |
| 37 // the cache. | 39 // the cache. |
| 38 false, | 40 false, |
| 39 // Storage path for http cache and cookie storage. | 41 // Storage path for http cache and cookie storage. |
| 40 "/data/data/org.chromium.net/app_cronet_test/test_storage", | 42 "/data/data/org.chromium.net/app_cronet_test/test_storage", |
| 41 // User-Agent request header field. | 43 // User-Agent request header field. |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 TEST(URLRequestContextConfigTest, SetQuicConnectionMigrationOptions) { | 129 TEST(URLRequestContextConfigTest, SetQuicConnectionMigrationOptions) { |
| 128 URLRequestContextConfig config( | 130 URLRequestContextConfig config( |
| 129 // Enable QUIC. | 131 // Enable QUIC. |
| 130 true, | 132 true, |
| 131 // QUIC User Agent ID. | 133 // QUIC User Agent ID. |
| 132 "Default QUIC User Agent ID", | 134 "Default QUIC User Agent ID", |
| 133 // Enable SPDY. | 135 // Enable SPDY. |
| 134 true, | 136 true, |
| 135 // Enable SDCH. | 137 // Enable SDCH. |
| 136 false, | 138 false, |
| 139 // Enable Brotli. |
| 140 false, |
| 137 // Type of http cache. | 141 // Type of http cache. |
| 138 URLRequestContextConfig::HttpCacheType::DISK, | 142 URLRequestContextConfig::HttpCacheType::DISK, |
| 139 // Max size of http cache in bytes. | 143 // Max size of http cache in bytes. |
| 140 1024000, | 144 1024000, |
| 141 // Disable caching for HTTP responses. Other information may be stored in | 145 // Disable caching for HTTP responses. Other information may be stored in |
| 142 // the cache. | 146 // the cache. |
| 143 false, | 147 false, |
| 144 // Storage path for http cache and cookie storage. | 148 // Storage path for http cache and cookie storage. |
| 145 "/data/data/org.chromium.net/app_cronet_test/test_storage", | 149 "/data/data/org.chromium.net/app_cronet_test/test_storage", |
| 146 // User-Agent request header field. | 150 // User-Agent request header field. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 context->GetNetworkSessionParams(); | 182 context->GetNetworkSessionParams(); |
| 179 | 183 |
| 180 EXPECT_FALSE(params->quic_close_sessions_on_ip_change); | 184 EXPECT_FALSE(params->quic_close_sessions_on_ip_change); |
| 181 EXPECT_TRUE(params->quic_migrate_sessions_on_network_change); | 185 EXPECT_TRUE(params->quic_migrate_sessions_on_network_change); |
| 182 EXPECT_TRUE(params->quic_migrate_sessions_early); | 186 EXPECT_TRUE(params->quic_migrate_sessions_early); |
| 183 } | 187 } |
| 184 | 188 |
| 185 // See stale_host_resolver_unittest.cc for test of StaleDNS options. | 189 // See stale_host_resolver_unittest.cc for test of StaleDNS options. |
| 186 | 190 |
| 187 } // namespace cronet | 191 } // namespace cronet |
| OLD | NEW |