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

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

Issue 14188044: Avoid double-InitCache() in SimpleDoomBetween test, leak (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | no next file » | 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 2883 matching lines...) Expand 10 before | Expand all | Expand 10 after
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) { 2902 TEST_F(DiskCacheBackendTest, SimpleDoomRecent) {
2903 SetSimpleCacheMode(); 2903 SetSimpleCacheMode();
2904 InitCache();
2905 BackendDoomRecent(); 2904 BackendDoomRecent();
2906 } 2905 }
2907 2906
2908 TEST_F(DiskCacheBackendTest, SimpleDoomBetween) { 2907 TEST_F(DiskCacheBackendTest, SimpleDoomBetween) {
2909 SetSimpleCacheMode(); 2908 SetSimpleCacheMode();
2910 InitCache();
2911 BackendDoomBetween(); 2909 BackendDoomBetween();
2912 } 2910 }
2913 2911
2914 #endif // !defined(OS_WIN) 2912 #endif // !defined(OS_WIN)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698