| OLD | NEW |
| 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 "base/file_util.h" | 5 #include "base/file_util.h" |
| 6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
| 7 #include "base/platform_thread.h" | 7 #include "base/platform_thread.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
| 10 #include "net/disk_cache/backend_impl.h" | 10 #include "net/disk_cache/backend_impl.h" |
| 11 #include "net/disk_cache/disk_cache_test_base.h" | 11 #include "net/disk_cache/disk_cache_test_base.h" |
| 12 #include "net/disk_cache/disk_cache_test_util.h" | 12 #include "net/disk_cache/disk_cache_test_util.h" |
| 13 #include "net/disk_cache/mapped_file.h" | 13 #include "net/disk_cache/mapped_file.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 15 |
| 16 using base::Time; |
| 17 |
| 16 namespace { | 18 namespace { |
| 17 | 19 |
| 18 // Copies a set of cache files from the data folder to the test folder. | 20 // Copies a set of cache files from the data folder to the test folder. |
| 19 bool CopyTestCache(const std::wstring& name) { | 21 bool CopyTestCache(const std::wstring& name) { |
| 20 std::wstring path; | 22 std::wstring path; |
| 21 PathService::Get(base::DIR_SOURCE_ROOT, &path); | 23 PathService::Get(base::DIR_SOURCE_ROOT, &path); |
| 22 file_util::AppendToPath(&path, L"net"); | 24 file_util::AppendToPath(&path, L"net"); |
| 23 file_util::AppendToPath(&path, L"data"); | 25 file_util::AppendToPath(&path, L"data"); |
| 24 file_util::AppendToPath(&path, L"cache_tests"); | 26 file_util::AppendToPath(&path, L"cache_tests"); |
| 25 file_util::AppendToPath(&path, name); | 27 file_util::AppendToPath(&path, name); |
| (...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 967 InitCache(); | 969 InitCache(); |
| 968 BackendDoomAll(); | 970 BackendDoomAll(); |
| 969 } | 971 } |
| 970 | 972 |
| 971 TEST_F(DiskCacheBackendTest, MemoryOnlyDoomAll) { | 973 TEST_F(DiskCacheBackendTest, MemoryOnlyDoomAll) { |
| 972 SetMemoryOnlyMode(); | 974 SetMemoryOnlyMode(); |
| 973 InitCache(); | 975 InitCache(); |
| 974 BackendDoomAll(); | 976 BackendDoomAll(); |
| 975 } | 977 } |
| 976 | 978 |
| OLD | NEW |