OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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" |
(...skipping 27 matching lines...) Expand all Loading... |
38 string16 text; | 38 string16 text; |
39 }; | 39 }; |
40 | 40 |
41 // A non-mock URL request which can access http:// and file:// urls. | 41 // A non-mock URL request which can access http:// and file:// urls. |
42 class RequestContext : public URLRequestContext { | 42 class RequestContext : public URLRequestContext { |
43 public: | 43 public: |
44 RequestContext() : ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) { | 44 RequestContext() : ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) { |
45 ProxyConfig no_proxy; | 45 ProxyConfig no_proxy; |
46 storage_.set_host_resolver( | 46 storage_.set_host_resolver( |
47 CreateSystemHostResolver(HostResolver::kDefaultParallelism, | 47 CreateSystemHostResolver(HostResolver::kDefaultParallelism, |
| 48 HostResolver::kDefaultRetryAttempts, |
48 NULL)); | 49 NULL)); |
49 storage_.set_cert_verifier(new CertVerifier); | 50 storage_.set_cert_verifier(new CertVerifier); |
50 storage_.set_proxy_service(ProxyService::CreateFixed(no_proxy)); | 51 storage_.set_proxy_service(ProxyService::CreateFixed(no_proxy)); |
51 storage_.set_ssl_config_service(new SSLConfigServiceDefaults); | 52 storage_.set_ssl_config_service(new SSLConfigServiceDefaults); |
52 | 53 |
53 HttpNetworkSession::Params params; | 54 HttpNetworkSession::Params params; |
54 params.host_resolver = host_resolver(); | 55 params.host_resolver = host_resolver(); |
55 params.cert_verifier = cert_verifier(); | 56 params.cert_verifier = cert_verifier(); |
56 params.proxy_service = proxy_service(); | 57 params.proxy_service = proxy_service(); |
57 params.ssl_config_service = ssl_config_service(); | 58 params.ssl_config_service = ssl_config_service(); |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 { | 374 { |
374 GURL url(kEncodedUrlBroken); | 375 GURL url(kEncodedUrlBroken); |
375 string16 text; | 376 string16 text; |
376 TestCompletionCallback callback; | 377 TestCompletionCallback callback; |
377 int result = pac_fetcher.Fetch(url, &text, &callback); | 378 int result = pac_fetcher.Fetch(url, &text, &callback); |
378 EXPECT_EQ(ERR_FAILED, result); | 379 EXPECT_EQ(ERR_FAILED, result); |
379 } | 380 } |
380 } | 381 } |
381 | 382 |
382 } // namespace net | 383 } // namespace net |
OLD | NEW |