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

Side by Side Diff: net/url_request/url_request_quic_unittest.cc

Issue 2907463002: Split HttpNetworkSession::Params into two structs. (Closed)
Patch Set: Response to comments Created 3 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 unified diff | Download patch
« no previous file with comments | « net/url_request/url_request_http_job.cc ('k') | net/url_request/url_request_test_util.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <memory> 5 #include <memory>
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 "test.example.com", verify_result, 61 "test.example.com", verify_result,
62 OK); 62 OK);
63 verify_result.verified_cert = ImportCertFromFile( 63 verify_result.verified_cert = ImportCertFromFile(
64 GetTestCertsDirectory(), "quic_test_ecc.example.com.crt"); 64 GetTestCertsDirectory(), "quic_test_ecc.example.com.crt");
65 cert_verifier_.AddResultForCertAndHost(verify_result.verified_cert.get(), 65 cert_verifier_.AddResultForCertAndHost(verify_result.verified_cert.get(),
66 "test.example.com", verify_result, 66 "test.example.com", verify_result,
67 OK); 67 OK);
68 // To simplify the test, and avoid the race with the HTTP request, we force 68 // To simplify the test, and avoid the race with the HTTP request, we force
69 // QUIC for these requests. 69 // QUIC for these requests.
70 params->origins_to_force_quic_on.insert(HostPortPair(kTestServerHost, 443)); 70 params->origins_to_force_quic_on.insert(HostPortPair(kTestServerHost, 443));
71 params->cert_verifier = &cert_verifier_;
72 params->enable_quic = true; 71 params->enable_quic = true;
73 params->enable_server_push_cancellation = true; 72 params->enable_server_push_cancellation = true;
74 context_->set_host_resolver(host_resolver_.get()); 73 context_->set_host_resolver(host_resolver_.get());
75 context_->set_http_network_session_params(std::move(params)); 74 context_->set_http_network_session_params(std::move(params));
76 context_->set_cert_verifier(&cert_verifier_); 75 context_->set_cert_verifier(&cert_verifier_);
77 context_->set_net_log(&net_log_); 76 context_->set_net_log(&net_log_);
78 } 77 }
79 78
80 void TearDown() override { 79 void TearDown() override {
81 if (server_) { 80 if (server_) {
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 ASSERT_TRUE(request2->is_pending()); 478 ASSERT_TRUE(request2->is_pending());
480 run_loop.Run(); 479 run_loop.Run();
481 480
482 EXPECT_TRUE(request->status().is_success()); 481 EXPECT_TRUE(request->status().is_success());
483 EXPECT_TRUE(request2->status().is_success()); 482 EXPECT_TRUE(request2->status().is_success());
484 EXPECT_EQ(kHelloBodyValue, delegate.data_received()); 483 EXPECT_EQ(kHelloBodyValue, delegate.data_received());
485 EXPECT_EQ(kHelloBodyValue, delegate2.data_received()); 484 EXPECT_EQ(kHelloBodyValue, delegate2.data_received());
486 } 485 }
487 486
488 } // namespace net 487 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_http_job.cc ('k') | net/url_request/url_request_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698