OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/port.h" | 7 #include "base/port.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" | 10 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" |
(...skipping 2753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2764 | 2764 |
2765 disk_cache::SimpleFileHeader header; | 2765 disk_cache::SimpleFileHeader header; |
2766 header.initial_magic_number = GG_UINT64_C(0xbadf00d); | 2766 header.initial_magic_number = GG_UINT64_C(0xbadf00d); |
2767 EXPECT_EQ( | 2767 EXPECT_EQ( |
2768 implicit_cast<int>(sizeof(header)), | 2768 implicit_cast<int>(sizeof(header)), |
2769 file_util::WriteFile(entry_file1_path, reinterpret_cast<char*>(&header), | 2769 file_util::WriteFile(entry_file1_path, reinterpret_cast<char*>(&header), |
2770 sizeof(header))); | 2770 sizeof(header))); |
2771 ASSERT_EQ(net::ERR_FAILED, OpenEntry(key, &entry)); | 2771 ASSERT_EQ(net::ERR_FAILED, OpenEntry(key, &entry)); |
2772 } | 2772 } |
2773 | 2773 |
| 2774 TEST_F(DiskCacheBackendTest, SimpleDoomRecent) { |
| 2775 SetSimpleCacheMode(); |
| 2776 InitCache(); |
| 2777 BackendDoomRecent(); |
| 2778 } |
| 2779 |
| 2780 TEST_F(DiskCacheBackendTest, SimpleDoomBetween) { |
| 2781 SetSimpleCacheMode(); |
| 2782 InitCache(); |
| 2783 BackendDoomBetween(); |
| 2784 } |
| 2785 |
2774 #endif // !defined(OS_WIN) | 2786 #endif // !defined(OS_WIN) |
OLD | NEW |