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

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

Issue 4067002: First pass at adding http/backend cache to NetLog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Add back mysteriously missing files Created 10 years 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) 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 <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 net::ProxyConfig no_proxy; 38 net::ProxyConfig no_proxy;
39 host_resolver_ = 39 host_resolver_ =
40 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, 40 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism,
41 NULL, NULL); 41 NULL, NULL);
42 proxy_service_ = net::ProxyService::CreateFixed(no_proxy); 42 proxy_service_ = net::ProxyService::CreateFixed(no_proxy);
43 ssl_config_service_ = new net::SSLConfigServiceDefaults; 43 ssl_config_service_ = new net::SSLConfigServiceDefaults;
44 44
45 http_transaction_factory_ = new net::HttpCache( 45 http_transaction_factory_ = new net::HttpCache(
46 net::HttpNetworkLayer::CreateFactory(host_resolver_, NULL, NULL, NULL, 46 net::HttpNetworkLayer::CreateFactory(host_resolver_, NULL, NULL, NULL,
47 proxy_service_, ssl_config_service_, NULL, NULL, NULL), 47 proxy_service_, ssl_config_service_, NULL, NULL, NULL),
48 net::HttpCache::DefaultBackend::InMemory(0)); 48 net::HttpCache::DefaultBackend::InMemory(0),
49 NULL);
49 } 50 }
50 51
51 private: 52 private:
52 ~RequestContext() { 53 ~RequestContext() {
53 delete http_transaction_factory_; 54 delete http_transaction_factory_;
54 delete host_resolver_; 55 delete host_resolver_;
55 } 56 }
56 }; 57 };
57 58
58 // Required to be in net namespace by FRIEND_TEST. 59 // Required to be in net namespace by FRIEND_TEST.
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 string16 text; 323 string16 text;
323 TestCompletionCallback callback; 324 TestCompletionCallback callback;
324 int result = pac_fetcher.Fetch(url, &text, &callback); 325 int result = pac_fetcher.Fetch(url, &text, &callback);
325 EXPECT_EQ(ERR_IO_PENDING, result); 326 EXPECT_EQ(ERR_IO_PENDING, result);
326 EXPECT_EQ(OK, callback.WaitForResult()); 327 EXPECT_EQ(OK, callback.WaitForResult());
327 EXPECT_EQ(ASCIIToUTF16("This was encoded as UTF-16BE.\n"), text); 328 EXPECT_EQ(ASCIIToUTF16("This was encoded as UTF-16BE.\n"), text);
328 } 329 }
329 } 330 }
330 331
331 } // namespace net 332 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698