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

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

Issue 2045703003: Enable NQE when Cronet Engine is built (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed mef comments Created 4 years, 5 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') | net/nqe/network_quality_estimator.h » ('j') | 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/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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 "\"AsyncDNS\":{\"enable\":true}}", 50 "\"AsyncDNS\":{\"enable\":true}}",
51 // Data reduction proxy key. 51 // Data reduction proxy key.
52 "", 52 "",
53 // Data reduction proxy. 53 // Data reduction proxy.
54 "", 54 "",
55 // Fallback data reduction proxy. 55 // Fallback data reduction proxy.
56 "", 56 "",
57 // Data reduction proxy secure proxy check URL. 57 // Data reduction proxy secure proxy check URL.
58 "", 58 "",
59 // MockCertVerifier to use for testing purposes. 59 // MockCertVerifier to use for testing purposes.
60 std::unique_ptr<net::CertVerifier>()); 60 std::unique_ptr<net::CertVerifier>(),
61 // Enable network quality estimator.
62 false);
61 63
62 net::URLRequestContextBuilder builder; 64 net::URLRequestContextBuilder builder;
63 net::NetLog net_log; 65 net::NetLog net_log;
64 config.ConfigureURLRequestContextBuilder(&builder, &net_log, nullptr); 66 config.ConfigureURLRequestContextBuilder(&builder, &net_log, nullptr);
65 // Set a ProxyConfigService to avoid DCHECK failure when building. 67 // Set a ProxyConfigService to avoid DCHECK failure when building.
66 builder.set_proxy_config_service(base::WrapUnique( 68 builder.set_proxy_config_service(base::WrapUnique(
67 new net::ProxyConfigServiceFixed(net::ProxyConfig::CreateDirect()))); 69 new net::ProxyConfigServiceFixed(net::ProxyConfig::CreateDirect())));
68 std::unique_ptr<net::URLRequestContext> context(builder.Build()); 70 std::unique_ptr<net::URLRequestContext> context(builder.Build());
69 const net::HttpNetworkSession::Params* params = 71 const net::HttpNetworkSession::Params* params =
70 context->GetNetworkSessionParams(); 72 context->GetNetworkSessionParams();
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 "\"migrate_sessions_early\":true}}", 129 "\"migrate_sessions_early\":true}}",
128 // Data reduction proxy key. 130 // Data reduction proxy key.
129 "", 131 "",
130 // Data reduction proxy. 132 // Data reduction proxy.
131 "", 133 "",
132 // Fallback data reduction proxy. 134 // Fallback data reduction proxy.
133 "", 135 "",
134 // Data reduction proxy secure proxy check URL. 136 // Data reduction proxy secure proxy check URL.
135 "", 137 "",
136 // MockCertVerifier to use for testing purposes. 138 // MockCertVerifier to use for testing purposes.
137 std::unique_ptr<net::CertVerifier>()); 139 std::unique_ptr<net::CertVerifier>(),
140 // Enable network quality estimator.
141 false);
138 142
139 net::URLRequestContextBuilder builder; 143 net::URLRequestContextBuilder builder;
140 net::NetLog net_log; 144 net::NetLog net_log;
141 config.ConfigureURLRequestContextBuilder(&builder, &net_log, nullptr); 145 config.ConfigureURLRequestContextBuilder(&builder, &net_log, nullptr);
142 // Set a ProxyConfigService to avoid DCHECK failure when building. 146 // Set a ProxyConfigService to avoid DCHECK failure when building.
143 builder.set_proxy_config_service(base::WrapUnique( 147 builder.set_proxy_config_service(base::WrapUnique(
144 new net::ProxyConfigServiceFixed(net::ProxyConfig::CreateDirect()))); 148 new net::ProxyConfigServiceFixed(net::ProxyConfig::CreateDirect())));
145 std::unique_ptr<net::URLRequestContext> context(builder.Build()); 149 std::unique_ptr<net::URLRequestContext> context(builder.Build());
146 const net::HttpNetworkSession::Params* params = 150 const net::HttpNetworkSession::Params* params =
147 context->GetNetworkSessionParams(); 151 context->GetNetworkSessionParams();
148 152
149 EXPECT_FALSE(params->quic_close_sessions_on_ip_change); 153 EXPECT_FALSE(params->quic_close_sessions_on_ip_change);
150 EXPECT_TRUE(params->quic_migrate_sessions_on_network_change); 154 EXPECT_TRUE(params->quic_migrate_sessions_on_network_change);
151 EXPECT_TRUE(params->quic_migrate_sessions_early); 155 EXPECT_TRUE(params->quic_migrate_sessions_early);
152 } 156 }
153 157
154 } // namespace cronet 158 } // namespace cronet
OLDNEW
« no previous file with comments | « components/cronet/url_request_context_config.cc ('k') | net/nqe/network_quality_estimator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698