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

Side by Side Diff: net/url_request/url_request_unittest.cc

Issue 149511: Refactorings surrounding HostResolver:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Merge in socks5_client_socket_unittest.cc Created 11 years, 5 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
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/url_request/url_request_unittest.h" 5 #include "net/url_request/url_request_unittest.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <windows.h> 10 #include <windows.h>
(...skipping 27 matching lines...) Expand all
38 #include "testing/gtest/include/gtest/gtest.h" 38 #include "testing/gtest/include/gtest/gtest.h"
39 #include "testing/platform_test.h" 39 #include "testing/platform_test.h"
40 40
41 using base::Time; 41 using base::Time;
42 42
43 namespace { 43 namespace {
44 44
45 class URLRequestHttpCacheContext : public URLRequestContext { 45 class URLRequestHttpCacheContext : public URLRequestContext {
46 public: 46 public:
47 URLRequestHttpCacheContext() { 47 URLRequestHttpCacheContext() {
48 host_resolver_ = new net::HostResolver; 48 host_resolver_ = net::CreateSystemHostResolver();
49 proxy_service_ = net::ProxyService::CreateNull(); 49 proxy_service_ = net::ProxyService::CreateNull();
50 http_transaction_factory_ = 50 http_transaction_factory_ =
51 new net::HttpCache( 51 new net::HttpCache(
52 net::HttpNetworkLayer::CreateFactory(host_resolver_, proxy_service_), 52 net::HttpNetworkLayer::CreateFactory(host_resolver_, proxy_service_),
53 disk_cache::CreateInMemoryCacheBackend(0)); 53 disk_cache::CreateInMemoryCacheBackend(0));
54 // In-memory cookie store. 54 // In-memory cookie store.
55 cookie_store_ = new net::CookieMonster(); 55 cookie_store_ = new net::CookieMonster();
56 } 56 }
57 57
58 virtual ~URLRequestHttpCacheContext() { 58 virtual ~URLRequestHttpCacheContext() {
(...skipping 1765 matching lines...) Expand 10 before | Expand all | Expand 10 after
1824 1824
1825 int64 file_size = 0; 1825 int64 file_size = 0;
1826 file_util::GetFileSize(app_path, &file_size); 1826 file_util::GetFileSize(app_path, &file_size);
1827 1827
1828 EXPECT_TRUE(!r.is_pending()); 1828 EXPECT_TRUE(!r.is_pending());
1829 EXPECT_EQ(1, d.response_started_count()); 1829 EXPECT_EQ(1, d.response_started_count());
1830 EXPECT_FALSE(d.received_data_before_response()); 1830 EXPECT_FALSE(d.received_data_before_response());
1831 EXPECT_EQ(d.bytes_received(), 0); 1831 EXPECT_EQ(d.bytes_received(), 0);
1832 } 1832 }
1833 } 1833 }
OLDNEW
« no previous file with comments | « net/url_request/url_request_unittest.h ('k') | webkit/tools/test_shell/test_shell_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698