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

Side by Side Diff: net/cert_net/cert_net_fetcher_impl_unittest.cc

Issue 1888963004: Add HttpProtocolHandler and convert everything to use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-supports-scheme
Patch Set: even more rebase Created 4 years, 8 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "net/cert_net/cert_net_fetcher_impl.h" 5 #include "net/cert_net/cert_net_fetcher_impl.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 params.cert_verifier = cert_verifier(); 50 params.cert_verifier = cert_verifier();
51 params.transport_security_state = transport_security_state(); 51 params.transport_security_state = transport_security_state();
52 params.proxy_service = proxy_service(); 52 params.proxy_service = proxy_service();
53 params.ssl_config_service = ssl_config_service(); 53 params.ssl_config_service = ssl_config_service();
54 params.http_server_properties = http_server_properties(); 54 params.http_server_properties = http_server_properties();
55 storage_.set_http_network_session( 55 storage_.set_http_network_session(
56 base::WrapUnique(new HttpNetworkSession(params))); 56 base::WrapUnique(new HttpNetworkSession(params)));
57 storage_.set_http_transaction_factory(base::WrapUnique(new HttpCache( 57 storage_.set_http_transaction_factory(base::WrapUnique(new HttpCache(
58 storage_.http_network_session(), HttpCache::DefaultBackend::InMemory(0), 58 storage_.http_network_session(), HttpCache::DefaultBackend::InMemory(0),
59 false /* set_up_quic_server_info */))); 59 false /* set_up_quic_server_info */)));
60 storage_.set_job_factory(base::WrapUnique(new URLRequestJobFactoryImpl())); 60 storage_.set_job_factory(
61 URLRequestJobFactoryImpl::CreateWithDefaultProtocolHandlers());
61 } 62 }
62 63
63 ~RequestContext() override { AssertNoURLRequests(); } 64 ~RequestContext() override { AssertNoURLRequests(); }
64 65
65 private: 66 private:
66 URLRequestContextStorage storage_; 67 URLRequestContextStorage storage_;
67 }; 68 };
68 69
69 class FetchResult { 70 class FetchResult {
70 public: 71 public:
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 EXPECT_EQ(1, network_delegate_.created_requests()); 753 EXPECT_EQ(1, network_delegate_.created_requests());
753 754
754 std::unique_ptr<FetchResult> result = callback1.WaitForResult(); 755 std::unique_ptr<FetchResult> result = callback1.WaitForResult();
755 result->VerifySuccess("-cert.crt-\n"); 756 result->VerifySuccess("-cert.crt-\n");
756 757
757 // request2 was cancelled. 758 // request2 was cancelled.
758 EXPECT_FALSE(callback2.HasResult()); 759 EXPECT_FALSE(callback2.HasResult());
759 } 760 }
760 761
761 } // namespace net 762 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698