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

Side by Side Diff: net/disk_cache/backend_unittest.cc

Issue 14295013: Simple Cache: DoomEntriesBetween() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix an actual bug in DoomEntry Created 7 years, 8 months 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 | « no previous file | net/disk_cache/simple/simple_backend_impl.h » ('j') | 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) 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 2881 matching lines...) Expand 10 before | Expand all | Expand 10 after
2892 2892
2893 disk_cache::SimpleFileHeader header; 2893 disk_cache::SimpleFileHeader header;
2894 header.initial_magic_number = GG_UINT64_C(0xbadf00d); 2894 header.initial_magic_number = GG_UINT64_C(0xbadf00d);
2895 EXPECT_EQ( 2895 EXPECT_EQ(
2896 implicit_cast<int>(sizeof(header)), 2896 implicit_cast<int>(sizeof(header)),
2897 file_util::WriteFile(entry_file1_path, reinterpret_cast<char*>(&header), 2897 file_util::WriteFile(entry_file1_path, reinterpret_cast<char*>(&header),
2898 sizeof(header))); 2898 sizeof(header)));
2899 ASSERT_EQ(net::ERR_FAILED, OpenEntry(key, &entry)); 2899 ASSERT_EQ(net::ERR_FAILED, OpenEntry(key, &entry));
2900 } 2900 }
2901 2901
2902 TEST_F(DiskCacheBackendTest, SimpleDoomRecent) {
2903 SetSimpleCacheMode();
2904 InitCache();
2905 BackendDoomRecent();
2906 }
2907
2908 TEST_F(DiskCacheBackendTest, SimpleDoomBetween) {
2909 SetSimpleCacheMode();
2910 InitCache();
2911 BackendDoomBetween();
2912 }
2913
2902 #endif // !defined(OS_WIN) 2914 #endif // !defined(OS_WIN)
OLDNEW
« no previous file with comments | « no previous file | net/disk_cache/simple/simple_backend_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698