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

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

Issue 23591048: Fix Simple Cache race on multiple dooms in flight. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add a unit test Created 7 years, 3 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/entry_unittest.cc » ('j') | net/disk_cache/entry_unittest.cc » ('J')
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/metrics/field_trial.h" 7 #include "base/metrics/field_trial.h"
8 #include "base/port.h" 8 #include "base/port.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 3194 matching lines...) Expand 10 before | Expand all | Expand 10 after
3205 BackendDoomRecent(); 3205 BackendDoomRecent();
3206 } 3206 }
3207 3207
3208 TEST_F(DiskCacheBackendTest, SimpleDoomBetween) { 3208 TEST_F(DiskCacheBackendTest, SimpleDoomBetween) {
3209 SetSimpleCacheMode(); 3209 SetSimpleCacheMode();
3210 BackendDoomBetween(); 3210 BackendDoomBetween();
3211 } 3211 }
3212 3212
3213 // See http://crbug.com/237450. 3213 // See http://crbug.com/237450.
3214 // TODO(gavinp): Consider enabling this test again when 3214 // TODO(gavinp): Consider enabling this test again when
3215 // https://codereview.chromium.org/23823002/ lands. 3215 // https://codereview.chromium.org/23823002/ lands.
pasko 2013/09/16 14:01:42 please remove the comment
gavinp 2013/09/16 14:14:41 Done.
3216 TEST_F(DiskCacheBackendTest, DISABLED_SimpleCacheDoomAll) { 3216 TEST_F(DiskCacheBackendTest, SimpleCacheDoomAll) {
3217 SetSimpleCacheMode(); 3217 SetSimpleCacheMode();
3218 BackendDoomAll(); 3218 BackendDoomAll();
3219 } 3219 }
3220 3220
3221 TEST_F(DiskCacheBackendTest, FLAKY_SimpleCacheAppCacheOnlyDoomAll) { 3221 TEST_F(DiskCacheBackendTest, FLAKY_SimpleCacheAppCacheOnlyDoomAll) {
3222 SetCacheType(net::APP_CACHE); 3222 SetCacheType(net::APP_CACHE);
3223 SetSimpleCacheMode(); 3223 SetSimpleCacheMode();
3224 BackendDoomAll(); 3224 BackendDoomAll();
3225 } 3225 }
3226 3226
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
3467 void* iter = NULL; 3467 void* iter = NULL;
3468 size_t count = 0; 3468 size_t count = 0;
3469 ASSERT_TRUE(EnumerateAndMatchKeys(-1, &iter, &keys_to_match, &count)); 3469 ASSERT_TRUE(EnumerateAndMatchKeys(-1, &iter, &keys_to_match, &count));
3470 cache_->EndEnumeration(&iter); 3470 cache_->EndEnumeration(&iter);
3471 3471
3472 EXPECT_EQ(key_pool.size(), count); 3472 EXPECT_EQ(key_pool.size(), count);
3473 EXPECT_TRUE(keys_to_match.empty()); 3473 EXPECT_TRUE(keys_to_match.empty());
3474 } 3474 }
3475 3475
3476 #endif // !defined(OS_WIN) 3476 #endif // !defined(OS_WIN)
OLDNEW
« no previous file with comments | « no previous file | net/disk_cache/entry_unittest.cc » ('j') | net/disk_cache/entry_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698