| 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 27 matching lines...) Expand all Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |