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

Unified Diff: components/cronet/url_request_context_config_unittest.cc

Issue 2711153007: Add Cronet experimental option to disable ipv6 (Closed)
Patch Set: oops Created 3 years, 10 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
« no previous file with comments | « components/cronet/url_request_context_config.cc ('k') | net/dns/mapped_host_resolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b072527ba5605e88ccec9650b3c5e5546c53a351..30c9feeaa17af1ac4225f474b52ab21b6075247d 100644
--- a/components/cronet/url_request_context_config_unittest.cc
+++ b/components/cronet/url_request_context_config_unittest.cc
@@ -51,7 +51,9 @@ TEST(URLRequestContextConfigTest, TestExperimentalOptionPassing) {
"\"connection_options\":\"TIME,TBBR,REJ\"},"
"\"AsyncDNS\":{\"enable\":true},"
"\"HostResolverRules\":{\"host_resolver_rules\":"
- "\"MAP * 127.0.0.1\"}}",
+ "\"MAP * 127.0.0.1\"},"
+ // See http://crbug.com/696569.
+ "\"disable_ipv6\":true}",
// Data reduction proxy key.
"",
// Data reduction proxy.
@@ -111,6 +113,10 @@ TEST(URLRequestContextConfigTest, TestExperimentalOptionPassing) {
// Check AsyncDNS resolver is enabled.
EXPECT_TRUE(context->host_resolver()->GetDnsConfigAsValue());
+ // Check IPv6 is disabled.
+ EXPECT_EQ(net::ADDRESS_FAMILY_IPV4,
+ context->host_resolver()->GetDefaultAddressFamily());
+
net::HostResolver::RequestInfo info(net::HostPortPair("abcde", 80));
net::AddressList addresses;
EXPECT_EQ(net::OK, context->host_resolver()->ResolveFromCache(
« no previous file with comments | « components/cronet/url_request_context_config.cc ('k') | net/dns/mapped_host_resolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698