| OLD | NEW |
| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 net::HttpNetworkLayer::CreateFactory(host_resolver_, proxy_service_), | 55 net::HttpNetworkLayer::CreateFactory(host_resolver_, proxy_service_), |
| 56 disk_cache::CreateInMemoryCacheBackend(0)); | 56 disk_cache::CreateInMemoryCacheBackend(0)); |
| 57 // In-memory cookie store. | 57 // In-memory cookie store. |
| 58 cookie_store_ = new net::CookieMonster(); | 58 cookie_store_ = new net::CookieMonster(); |
| 59 } | 59 } |
| 60 | 60 |
| 61 virtual ~URLRequestTestContext() { | 61 virtual ~URLRequestTestContext() { |
| 62 delete cookie_store_; | 62 delete cookie_store_; |
| 63 delete ftp_transaction_factory_; | 63 delete ftp_transaction_factory_; |
| 64 delete http_transaction_factory_; | 64 delete http_transaction_factory_; |
| 65 delete proxy_service_; | |
| 66 } | 65 } |
| 67 }; | 66 }; |
| 68 | 67 |
| 69 class TestURLRequest : public URLRequest { | 68 class TestURLRequest : public URLRequest { |
| 70 public: | 69 public: |
| 71 TestURLRequest(const GURL& url, Delegate* delegate) | 70 TestURLRequest(const GURL& url, Delegate* delegate) |
| 72 : URLRequest(url, delegate) { | 71 : URLRequest(url, delegate) { |
| 73 set_context(new URLRequestTestContext()); | 72 set_context(new URLRequestTestContext()); |
| 74 } | 73 } |
| 75 }; | 74 }; |
| (...skipping 1794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1870 | 1869 |
| 1871 int64 file_size = 0; | 1870 int64 file_size = 0; |
| 1872 file_util::GetFileSize(app_path, &file_size); | 1871 file_util::GetFileSize(app_path, &file_size); |
| 1873 | 1872 |
| 1874 EXPECT_FALSE(r.is_pending()); | 1873 EXPECT_FALSE(r.is_pending()); |
| 1875 EXPECT_EQ(1, d.response_started_count()); | 1874 EXPECT_EQ(1, d.response_started_count()); |
| 1876 EXPECT_FALSE(d.received_data_before_response()); | 1875 EXPECT_FALSE(d.received_data_before_response()); |
| 1877 EXPECT_EQ(d.bytes_received(), 0); | 1876 EXPECT_EQ(d.bytes_received(), 0); |
| 1878 } | 1877 } |
| 1879 } | 1878 } |
| OLD | NEW |