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

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

Issue 691803003: Do not DCHECK on SimpleCache deletion-while-closing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove bigger example test Created 6 years, 1 month 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
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/files/file_util.h" 6 #include "base/files/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 3463 matching lines...) Expand 10 before | Expand all | Expand 10 after
3474 3474
3475 scoped_ptr<TestIterator> iter = CreateIterator(); 3475 scoped_ptr<TestIterator> iter = CreateIterator();
3476 disk_cache::Entry* entry = NULL; 3476 disk_cache::Entry* entry = NULL;
3477 ASSERT_EQ(net::OK, iter->OpenNextEntry(&entry)); 3477 ASSERT_EQ(net::OK, iter->OpenNextEntry(&entry));
3478 EXPECT_TRUE(entry); 3478 EXPECT_TRUE(entry);
3479 disk_cache::ScopedEntryPtr entry_closer(entry); 3479 disk_cache::ScopedEntryPtr entry_closer(entry);
3480 3480
3481 cache_.reset(); 3481 cache_.reset();
3482 // This test passes if we don't leak memory. 3482 // This test passes if we don't leak memory.
3483 } 3483 }
3484
3485 // Tests that a SimpleCache doesn't crash when files are deleted very quickly
3486 // after closing.
3487 // NOTE: IF THIS TEST IS FLAKY THEN IT IS FAILING.
jkarlin 2014/10/30 19:19:24 Append the bug that this CL fixes to the test comm
jkarlin 2014/10/30 19:19:24 Does this flake at least say 20% of the time? It
gavinp 2014/10/31 13:55:54 I get a 100% failure rate on 100 iterations on my
gavinp 2014/10/31 13:55:54 Done.
3488 TEST_F(DiskCacheBackendTest, SimpleCacheDeleteQuickly) {
3489 SetSimpleCacheMode();
3490 InitCache();
3491 cache_.reset();
3492 EXPECT_TRUE(CleanupCacheDir());
3493 }
OLDNEW
« no previous file with comments | « no previous file | net/disk_cache/simple/simple_index_file.cc » ('j') | net/disk_cache/simple/simple_index_file.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698