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

Unified Diff: components/cronet/url_request_context_config_unittest.cc

Issue 1817553002: Add host resolver rules experimental flag for Cronet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: components/cronet/url_request_context_config_unittest.cc
diff --git a/components/cronet/url_request_context_config_unittest.cc b/components/cronet/url_request_context_config_unittest.cc
index c129a8fe236bd452eb4cd0de853c31a6bcb81af4..79afb7f6135fefbd9567f17ff1749e8923be80b0 100644
--- a/components/cronet/url_request_context_config_unittest.cc
+++ b/components/cronet/url_request_context_config_unittest.cc
@@ -16,7 +16,7 @@
namespace cronet {
-TEST(URLRequestContextConfigTest, SetQuicExperimentalOptions) {
+TEST(URLRequestContextConfigTest, TestExperimentalOptionPassing) {
URLRequestContextConfig config(
// Enable QUIC.
true,
@@ -47,7 +47,9 @@ TEST(URLRequestContextConfigTest, SetQuicExperimentalOptions) {
"\"idle_connection_timeout_seconds\":300,"
"\"close_sessions_on_ip_change\":true,"
"\"connection_options\":\"TIME,TBBR,REJ\"},"
- "\"AsyncDNS\":{\"enable\":true}}",
+ "\"AsyncDNS\":{\"enable\":true},"
+ "\"HostResolverRules\":{\"host_resolver_rules\":"
+ "\"MAP * 127.0.0.1\"}}",
// Data reduction proxy key.
"",
// Data reduction proxy.
@@ -60,8 +62,8 @@ TEST(URLRequestContextConfigTest, SetQuicExperimentalOptions) {
std::unique_ptr<net::CertVerifier>());
net::URLRequestContextBuilder builder;
- net::NetLog net_log;
- config.ConfigureURLRequestContextBuilder(&builder, &net_log, nullptr);
+ config.ConfigureURLRequestContextBuilder(&builder, new net::NetLog(),
pauljensen 2016/06/10 14:19:37 why the change to create NetLog on the heap? look
mgersh 2016/06/29 17:43:31 Done.
+ nullptr);
// Set a ProxyConfigService to avoid DCHECK failure when building.
builder.set_proxy_config_service(base::WrapUnique(
new net::ProxyConfigServiceFixed(net::ProxyConfig::CreateDirect())));
@@ -137,8 +139,8 @@ TEST(URLRequestContextConfigTest, SetQuicConnectionMigrationOptions) {
std::unique_ptr<net::CertVerifier>());
net::URLRequestContextBuilder builder;
- net::NetLog net_log;
- config.ConfigureURLRequestContextBuilder(&builder, &net_log, nullptr);
+ config.ConfigureURLRequestContextBuilder(&builder, new net::NetLog(),
+ nullptr);
// Set a ProxyConfigService to avoid DCHECK failure when building.
builder.set_proxy_config_service(base::WrapUnique(
new net::ProxyConfigServiceFixed(net::ProxyConfig::CreateDirect())));

Powered by Google App Engine
This is Rietveld 408576698