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

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: more 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
« no previous file with comments | « components/cronet/url_request_context_config.cc ('k') | no next file » | 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 c129a8fe236bd452eb4cd0de853c31a6bcb81af4..686f8753cd829a4fe12aa796b845c0057994053a 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.
@@ -99,6 +101,11 @@ TEST(URLRequestContextConfigTest, SetQuicExperimentalOptions) {
// Check AsyncDNS resolver is enabled.
EXPECT_TRUE(context->host_resolver()->GetDnsConfigAsValue());
+
+ net::HostResolver::RequestInfo info(net::HostPortPair("abcde", 80));
+ std::unique_ptr<net::AddressList> addresses(new net::AddressList);
pauljensen 2016/06/30 15:26:37 net::AddressList addresses;
mgersh 2016/06/30 22:54:53 Done.
+ EXPECT_EQ(net::OK, context->host_resolver()->ResolveFromCache(
+ info, addresses.get(), net::BoundNetLog()));
}
TEST(URLRequestContextConfigTest, SetQuicConnectionMigrationOptions) {
« 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