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

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

Issue 15070: Split ProxyResolver into two interfaces:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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
« no previous file with comments | « net/url_request/url_request_unittest.h ('k') | no next file » | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 11 matching lines...) Expand all
22 #include "base/string_piece.h" 22 #include "base/string_piece.h"
23 #include "base/string_util.h" 23 #include "base/string_util.h"
24 #include "net/base/load_flags.h" 24 #include "net/base/load_flags.h"
25 #include "net/base/net_errors.h" 25 #include "net/base/net_errors.h"
26 #include "net/base/net_module.h" 26 #include "net/base/net_module.h"
27 #include "net/base/net_util.h" 27 #include "net/base/net_util.h"
28 #include "net/base/ssl_test_util.h" 28 #include "net/base/ssl_test_util.h"
29 #include "net/disk_cache/disk_cache.h" 29 #include "net/disk_cache/disk_cache.h"
30 #include "net/http/http_cache.h" 30 #include "net/http/http_cache.h"
31 #include "net/http/http_network_layer.h" 31 #include "net/http/http_network_layer.h"
32 #include "net/proxy/proxy_resolver_null.h"
33 #include "net/proxy/proxy_service.h" 32 #include "net/proxy/proxy_service.h"
34 #include "net/url_request/url_request.h" 33 #include "net/url_request/url_request.h"
35 #include "testing/gtest/include/gtest/gtest.h" 34 #include "testing/gtest/include/gtest/gtest.h"
36 #include "testing/platform_test.h" 35 #include "testing/platform_test.h"
37 36
38 using base::Time; 37 using base::Time;
39 38
40 namespace { 39 namespace {
41 40
42 class URLRequestHttpCacheContext : public URLRequestContext { 41 class URLRequestHttpCacheContext : public URLRequestContext {
43 public: 42 public:
44 URLRequestHttpCacheContext() { 43 URLRequestHttpCacheContext() {
45 proxy_service_ = new net::ProxyService(new net::ProxyResolverNull); 44 proxy_service_ = net::ProxyService::CreateNull();
46 http_transaction_factory_ = 45 http_transaction_factory_ =
47 new net::HttpCache(net::HttpNetworkLayer::CreateFactory(proxy_service_), 46 new net::HttpCache(net::HttpNetworkLayer::CreateFactory(proxy_service_),
48 disk_cache::CreateInMemoryCacheBackend(0)); 47 disk_cache::CreateInMemoryCacheBackend(0));
49 } 48 }
50 49
51 virtual ~URLRequestHttpCacheContext() { 50 virtual ~URLRequestHttpCacheContext() {
52 delete http_transaction_factory_; 51 delete http_transaction_factory_;
53 delete proxy_service_; 52 delete proxy_service_;
54 } 53 }
55 }; 54 };
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 886
888 TEST_F(URLRequestTest, Post307RedirectPost) { 887 TEST_F(URLRequestTest, Post307RedirectPost) {
889 TestServer server(L"net/data/url_request_unittest"); 888 TestServer server(L"net/data/url_request_unittest");
890 TestDelegate d; 889 TestDelegate d;
891 TestURLRequest req(server.TestServerPage("files/redirect307-to-echoall"), &d); 890 TestURLRequest req(server.TestServerPage("files/redirect307-to-echoall"), &d);
892 req.set_method("POST"); 891 req.set_method("POST");
893 req.Start(); 892 req.Start();
894 MessageLoop::current()->Run(); 893 MessageLoop::current()->Run();
895 EXPECT_EQ(req.method(), "POST"); 894 EXPECT_EQ(req.method(), "POST");
896 } 895 }
OLDNEW
« no previous file with comments | « net/url_request/url_request_unittest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698