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

Unified Diff: net/url_request/url_request_quic_unittest.cc

Issue 2693083002: Server push cancellation: fix host resolver set up in URLRequestQuicTest (Closed)
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_quic_unittest.cc
diff --git a/net/url_request/url_request_quic_unittest.cc b/net/url_request/url_request_quic_unittest.cc
index a7132657ead39ab4c383d072dcf955fd4963d2e7..3a301567ecc5da2d77c2febb735570c0b4cefb2c 100644
--- a/net/url_request/url_request_quic_unittest.cc
+++ b/net/url_request/url_request_quic_unittest.cc
@@ -35,7 +35,7 @@ namespace {
// This must match the certificate used (quic_test.example.com.crt and
// quic_test.example.com.key.pkcs8).
const int kTestServerPort = 6121;
-const char kTestServerHost[] = "test.example.com:6121";
+const char kTestServerHost[] = "test.example.com";
// Used as a simple response from the server.
const char kHelloPath[] = "/hello.txt";
const char kHelloBodyValue[] = "Hello from QUIC Server";
@@ -62,10 +62,10 @@ class URLRequestQuicTest : public ::testing::Test {
// To simplify the test, and avoid the race with the HTTP request, we force
// QUIC for these requests.
params->origins_to_force_quic_on.insert(
- HostPortPair::FromString(kTestServerHost));
+ HostPortPair::FromString("test.example.com:443"));
Ryan Hamilton 2017/02/14 05:22:04 nit: HostPortPair(kTestServerHost, 443));
Zhongyi Shi 2017/02/14 05:52:57 Done.
params->cert_verifier = &cert_verifier_;
params->enable_quic = true;
- params->host_resolver = host_resolver_.get();
+ context_->set_host_resolver(host_resolver_.get());
Ryan Hamilton 2017/02/14 05:22:03 Did the old code not actually work?
Zhongyi Shi 2017/02/14 05:52:57 The old code is not using the host resolver rules
context_->set_http_network_session_params(std::move(params));
context_->set_cert_verifier(&cert_verifier_);
}
@@ -116,7 +116,7 @@ class URLRequestQuicTest : public ::testing::Test {
host_resolver_.reset(new MappedHostResolver(std::move(resolver)));
// Use a mapped host resolver so that request for test.example.com (port 80)
Ryan Hamilton 2017/02/14 05:22:04 Is port 80 really correct in this comment?
Zhongyi Shi 2017/02/14 05:52:57 Done.
// reach the server running on localhost.
- std::string map_rule = "MAP test.example.com test.example.com:" +
+ std::string map_rule = "MAP test.example.com:443 test.example.com:" +
Ryan Hamilton 2017/02/14 05:22:04 Is 443 required here?
Zhongyi Shi 2017/02/14 05:52:57 Aha, it's not required here. I was following the h
base::IntToString(server_->server_address().port());
EXPECT_TRUE(host_resolver_->AddRuleFromString(map_rule));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698