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

Side by Side Diff: components/cronet/url_request_context_config_unittest.cc

Issue 2839413003: Delete Cronet Data Reduction Proxy integration (Closed)
Patch Set: Created 3 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
« no previous file with comments | « components/cronet/url_request_context_config.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 "\"idle_connection_timeout_seconds\":300," 48 "\"idle_connection_timeout_seconds\":300,"
49 "\"close_sessions_on_ip_change\":true," 49 "\"close_sessions_on_ip_change\":true,"
50 "\"race_cert_verification\":true," 50 "\"race_cert_verification\":true,"
51 "\"connection_options\":\"TIME,TBBR,REJ\"}," 51 "\"connection_options\":\"TIME,TBBR,REJ\"},"
52 "\"AsyncDNS\":{\"enable\":true}," 52 "\"AsyncDNS\":{\"enable\":true},"
53 "\"UnknownOption\":{\"foo\":true}," 53 "\"UnknownOption\":{\"foo\":true},"
54 "\"HostResolverRules\":{\"host_resolver_rules\":" 54 "\"HostResolverRules\":{\"host_resolver_rules\":"
55 "\"MAP * 127.0.0.1\"}," 55 "\"MAP * 127.0.0.1\"},"
56 // See http://crbug.com/696569. 56 // See http://crbug.com/696569.
57 "\"disable_ipv6_on_wifi\":true}", 57 "\"disable_ipv6_on_wifi\":true}",
58 // Data reduction proxy key.
59 "",
60 // Data reduction proxy.
61 "",
62 // Fallback data reduction proxy.
63 "",
64 // Data reduction proxy secure proxy check URL.
65 "",
66 // MockCertVerifier to use for testing purposes. 58 // MockCertVerifier to use for testing purposes.
67 std::unique_ptr<net::CertVerifier>(), 59 std::unique_ptr<net::CertVerifier>(),
68 // Enable network quality estimator. 60 // Enable network quality estimator.
69 false, 61 false,
70 // Enable Public Key Pinning bypass for local trust anchors. 62 // Enable Public Key Pinning bypass for local trust anchors.
71 true, 63 true,
72 // Certificate verifier cache data. 64 // Certificate verifier cache data.
73 ""); 65 "");
74 66
75 base::MessageLoop message_loop; 67 base::MessageLoop message_loop;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // Disable caching for HTTP responses. Other information may be stored in 129 // Disable caching for HTTP responses. Other information may be stored in
138 // the cache. 130 // the cache.
139 false, 131 false,
140 // Storage path for http cache and cookie storage. 132 // Storage path for http cache and cookie storage.
141 "/data/data/org.chromium.net/app_cronet_test/test_storage", 133 "/data/data/org.chromium.net/app_cronet_test/test_storage",
142 // User-Agent request header field. 134 // User-Agent request header field.
143 "fake agent", 135 "fake agent",
144 // JSON encoded experimental options. 136 // JSON encoded experimental options.
145 "{\"QUIC\":{\"migrate_sessions_on_network_change\":true," 137 "{\"QUIC\":{\"migrate_sessions_on_network_change\":true,"
146 "\"migrate_sessions_early\":true}}", 138 "\"migrate_sessions_early\":true}}",
147 // Data reduction proxy key.
148 "",
149 // Data reduction proxy.
150 "",
151 // Fallback data reduction proxy.
152 "",
153 // Data reduction proxy secure proxy check URL.
154 "",
155 // MockCertVerifier to use for testing purposes. 139 // MockCertVerifier to use for testing purposes.
156 std::unique_ptr<net::CertVerifier>(), 140 std::unique_ptr<net::CertVerifier>(),
157 // Enable network quality estimator. 141 // Enable network quality estimator.
158 false, 142 false,
159 // Enable Public Key Pinning bypass for local trust anchors. 143 // Enable Public Key Pinning bypass for local trust anchors.
160 true, 144 true,
161 // Certificate verifier cache data. 145 // Certificate verifier cache data.
162 ""); 146 "");
163 147
164 base::MessageLoop message_loop; 148 base::MessageLoop message_loop;
165 net::URLRequestContextBuilder builder; 149 net::URLRequestContextBuilder builder;
166 net::NetLog net_log; 150 net::NetLog net_log;
167 config.ConfigureURLRequestContextBuilder(&builder, &net_log, nullptr); 151 config.ConfigureURLRequestContextBuilder(&builder, &net_log, nullptr);
168 // Set a ProxyConfigService to avoid DCHECK failure when building. 152 // Set a ProxyConfigService to avoid DCHECK failure when building.
169 builder.set_proxy_config_service( 153 builder.set_proxy_config_service(
170 base::MakeUnique<net::ProxyConfigServiceFixed>( 154 base::MakeUnique<net::ProxyConfigServiceFixed>(
171 net::ProxyConfig::CreateDirect())); 155 net::ProxyConfig::CreateDirect()));
172 std::unique_ptr<net::URLRequestContext> context(builder.Build()); 156 std::unique_ptr<net::URLRequestContext> context(builder.Build());
173 const net::HttpNetworkSession::Params* params = 157 const net::HttpNetworkSession::Params* params =
174 context->GetNetworkSessionParams(); 158 context->GetNetworkSessionParams();
175 159
176 EXPECT_FALSE(params->quic_close_sessions_on_ip_change); 160 EXPECT_FALSE(params->quic_close_sessions_on_ip_change);
177 EXPECT_TRUE(params->quic_migrate_sessions_on_network_change); 161 EXPECT_TRUE(params->quic_migrate_sessions_on_network_change);
178 EXPECT_TRUE(params->quic_migrate_sessions_early); 162 EXPECT_TRUE(params->quic_migrate_sessions_early);
179 } 163 }
180 164
181 // See stale_host_resolver_unittest.cc for test of StaleDNS options. 165 // See stale_host_resolver_unittest.cc for test of StaleDNS options.
182 166
183 } // namespace cronet 167 } // namespace cronet
OLDNEW
« no previous file with comments | « components/cronet/url_request_context_config.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698