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

Side by Side Diff: net/proxy/proxy_script_fetcher_impl_unittest.cc

Issue 9476035: Make CertVerifier a pure virtual interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win shared fix 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
« no previous file with comments | « net/net.gyp ('k') | net/socket/ssl_client_socket_mac.cc » ('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 (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/proxy/proxy_script_fetcher_impl.h" 5 #include "net/proxy/proxy_script_fetcher_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "net/base/cert_verifier.h"
13 #include "net/base/net_util.h" 14 #include "net/base/net_util.h"
14 #include "net/base/load_flags.h" 15 #include "net/base/load_flags.h"
15 #include "net/base/ssl_config_service_defaults.h" 16 #include "net/base/ssl_config_service_defaults.h"
16 #include "net/base/test_completion_callback.h" 17 #include "net/base/test_completion_callback.h"
17 #include "net/disk_cache/disk_cache.h" 18 #include "net/disk_cache/disk_cache.h"
18 #include "net/http/http_cache.h" 19 #include "net/http/http_cache.h"
19 #include "net/http/http_network_session.h" 20 #include "net/http/http_network_session.h"
20 #include "net/http/http_server_properties_impl.h" 21 #include "net/http/http_server_properties_impl.h"
21 #include "net/test/test_server.h" 22 #include "net/test/test_server.h"
22 #include "net/url_request/url_request_context_storage.h" 23 #include "net/url_request/url_request_context_storage.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 66
66 // A non-mock URL request which can access http:// and file:// urls. 67 // A non-mock URL request which can access http:// and file:// urls.
67 class RequestContext : public URLRequestContext { 68 class RequestContext : public URLRequestContext {
68 public: 69 public:
69 RequestContext() : ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) { 70 RequestContext() : ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) {
70 ProxyConfig no_proxy; 71 ProxyConfig no_proxy;
71 storage_.set_host_resolver( 72 storage_.set_host_resolver(
72 CreateSystemHostResolver(HostResolver::kDefaultParallelism, 73 CreateSystemHostResolver(HostResolver::kDefaultParallelism,
73 HostResolver::kDefaultRetryAttempts, 74 HostResolver::kDefaultRetryAttempts,
74 NULL)); 75 NULL));
75 storage_.set_cert_verifier(new CertVerifier); 76 storage_.set_cert_verifier(CertVerifier::CreateDefault());
76 storage_.set_proxy_service(ProxyService::CreateFixed(no_proxy)); 77 storage_.set_proxy_service(ProxyService::CreateFixed(no_proxy));
77 storage_.set_ssl_config_service(new SSLConfigServiceDefaults); 78 storage_.set_ssl_config_service(new SSLConfigServiceDefaults);
78 storage_.set_http_server_properties(new HttpServerPropertiesImpl); 79 storage_.set_http_server_properties(new HttpServerPropertiesImpl);
79 80
80 HttpNetworkSession::Params params; 81 HttpNetworkSession::Params params;
81 params.host_resolver = host_resolver(); 82 params.host_resolver = host_resolver();
82 params.cert_verifier = cert_verifier(); 83 params.cert_verifier = cert_verifier();
83 params.proxy_service = proxy_service(); 84 params.proxy_service = proxy_service();
84 params.ssl_config_service = ssl_config_service(); 85 params.ssl_config_service = ssl_config_service();
85 params.http_server_properties = http_server_properties(); 86 params.http_server_properties = http_server_properties();
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 { 409 {
409 GURL url(kEncodedUrlBroken); 410 GURL url(kEncodedUrlBroken);
410 string16 text; 411 string16 text;
411 TestCompletionCallback callback; 412 TestCompletionCallback callback;
412 int result = pac_fetcher.Fetch(url, &text, callback.callback()); 413 int result = pac_fetcher.Fetch(url, &text, callback.callback());
413 EXPECT_EQ(ERR_FAILED, result); 414 EXPECT_EQ(ERR_FAILED, result);
414 } 415 }
415 } 416 }
416 417
417 } // namespace net 418 } // namespace net
OLDNEW
« no previous file with comments | « net/net.gyp ('k') | net/socket/ssl_client_socket_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698