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

Side by Side Diff: net/http/http_stream_factory_impl_unittest.cc

Issue 9476035: Make CertVerifier a pure virtual interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/http/http_stream_factory_impl.h" 5 #include "net/http/http_stream_factory_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "net/base/cert_verifier.h" 10 #include "net/base/cert_verifier.h"
11 #include "net/base/mock_host_resolver.h" 11 #include "net/base/mock_host_resolver.h"
12 #include "net/base/multi_threaded_cert_verifier.h"
12 #include "net/base/net_log.h" 13 #include "net/base/net_log.h"
13 #include "net/base/ssl_config_service_defaults.h" 14 #include "net/base/ssl_config_service_defaults.h"
14 #include "net/base/test_completion_callback.h" 15 #include "net/base/test_completion_callback.h"
15 #include "net/http/http_auth_handler_factory.h" 16 #include "net/http/http_auth_handler_factory.h"
16 #include "net/http/http_network_session.h" 17 #include "net/http/http_network_session.h"
17 #include "net/http/http_network_session_peer.h" 18 #include "net/http/http_network_session_peer.h"
18 #include "net/http/http_request_info.h" 19 #include "net/http/http_request_info.h"
19 #include "net/http/http_server_properties_impl.h" 20 #include "net/http/http_server_properties_impl.h"
20 #include "net/http/http_stream.h" 21 #include "net/http/http_stream.h"
21 #include "net/proxy/proxy_info.h" 22 #include "net/proxy/proxy_info.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 bool stream_done_; 112 bool stream_done_;
112 scoped_ptr<HttpStream> stream_; 113 scoped_ptr<HttpStream> stream_;
113 114
114 DISALLOW_COPY_AND_ASSIGN(StreamRequestWaiter); 115 DISALLOW_COPY_AND_ASSIGN(StreamRequestWaiter);
115 }; 116 };
116 117
117 struct SessionDependencies { 118 struct SessionDependencies {
118 // Custom proxy service dependency. 119 // Custom proxy service dependency.
119 explicit SessionDependencies(ProxyService* proxy_service) 120 explicit SessionDependencies(ProxyService* proxy_service)
120 : host_resolver(new MockHostResolver), 121 : host_resolver(new MockHostResolver),
121 cert_verifier(new CertVerifier), 122 cert_verifier(new MultiThreadedCertVerifier),
122 proxy_service(proxy_service), 123 proxy_service(proxy_service),
123 ssl_config_service(new SSLConfigServiceDefaults), 124 ssl_config_service(new SSLConfigServiceDefaults),
124 http_auth_handler_factory( 125 http_auth_handler_factory(
125 HttpAuthHandlerFactory::CreateDefault(host_resolver.get())), 126 HttpAuthHandlerFactory::CreateDefault(host_resolver.get())),
126 net_log(NULL) {} 127 net_log(NULL) {}
127 128
128 scoped_ptr<MockHostResolverBase> host_resolver; 129 scoped_ptr<MockHostResolverBase> host_resolver;
129 scoped_ptr<CertVerifier> cert_verifier; 130 scoped_ptr<CertVerifier> cert_verifier;
130 scoped_ptr<ProxyService> proxy_service; 131 scoped_ptr<ProxyService> proxy_service;
131 scoped_refptr<SSLConfigService> ssl_config_service; 132 scoped_refptr<SSLConfigService> ssl_config_service;
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 const ProxyRetryInfoMap& retry_info = 454 const ProxyRetryInfoMap& retry_info =
454 session->proxy_service()->proxy_retry_info(); 455 session->proxy_service()->proxy_retry_info();
455 EXPECT_EQ(1u, retry_info.size()); 456 EXPECT_EQ(1u, retry_info.size());
456 ProxyRetryInfoMap::const_iterator iter = retry_info.find("bad:99"); 457 ProxyRetryInfoMap::const_iterator iter = retry_info.find("bad:99");
457 EXPECT_TRUE(iter != retry_info.end()); 458 EXPECT_TRUE(iter != retry_info.end());
458 } 459 }
459 460
460 } // namespace 461 } // namespace
461 462
462 } // namespace net 463 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698