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

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

Issue 4208002: Revert 64202 - Initial support for built-in DNS resolver/cache.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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/host_resolver_impl.cc ('k') | net/socket/tcp_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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 18 matching lines...) Expand all
29 string16 text; 29 string16 text;
30 }; 30 };
31 31
32 // A non-mock URL request which can access http:// and file:// urls. 32 // A non-mock URL request which can access http:// and file:// urls.
33 class RequestContext : public URLRequestContext { 33 class RequestContext : public URLRequestContext {
34 public: 34 public:
35 RequestContext() { 35 RequestContext() {
36 net::ProxyConfig no_proxy; 36 net::ProxyConfig no_proxy;
37 host_resolver_ = 37 host_resolver_ =
38 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, 38 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism,
39 NULL, NULL); 39 NULL);
40 proxy_service_ = net::ProxyService::CreateFixed(no_proxy); 40 proxy_service_ = net::ProxyService::CreateFixed(no_proxy);
41 ssl_config_service_ = new net::SSLConfigServiceDefaults; 41 ssl_config_service_ = new net::SSLConfigServiceDefaults;
42 42
43 http_transaction_factory_ = new net::HttpCache( 43 http_transaction_factory_ = new net::HttpCache(
44 net::HttpNetworkLayer::CreateFactory(host_resolver_, NULL, NULL, 44 net::HttpNetworkLayer::CreateFactory(host_resolver_, NULL, NULL,
45 proxy_service_, ssl_config_service_, NULL, NULL, NULL), 45 proxy_service_, ssl_config_service_, NULL, NULL, NULL),
46 net::HttpCache::DefaultBackend::InMemory(0)); 46 net::HttpCache::DefaultBackend::InMemory(0));
47 } 47 }
48 48
49 private: 49 private:
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 string16 text; 324 string16 text;
325 TestCompletionCallback callback; 325 TestCompletionCallback callback;
326 int result = pac_fetcher->Fetch(url, &text, &callback); 326 int result = pac_fetcher->Fetch(url, &text, &callback);
327 EXPECT_EQ(ERR_IO_PENDING, result); 327 EXPECT_EQ(ERR_IO_PENDING, result);
328 EXPECT_EQ(OK, callback.WaitForResult()); 328 EXPECT_EQ(OK, callback.WaitForResult());
329 EXPECT_EQ(ASCIIToUTF16("This was encoded as UTF-16BE.\n"), text); 329 EXPECT_EQ(ASCIIToUTF16("This was encoded as UTF-16BE.\n"), text);
330 } 330 }
331 } 331 }
332 332
333 } // namespace net 333 } // namespace net
OLDNEW
« no previous file with comments | « net/base/host_resolver_impl.cc ('k') | net/socket/tcp_client_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698