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

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

Issue 7011044: Add a command line option to turn off retry attempts to resolve host (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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/base/mock_host_resolver.cc ('k') | net/socket/transport_client_socket_unittest.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) 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
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
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
OLDNEW
« no previous file with comments | « net/base/mock_host_resolver.cc ('k') | net/socket/transport_client_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698