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

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

Issue 8343048: Disk Cache: Supress tsan warnings for BackendTrimInvalidEntry2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/string_util.h" 7 #include "base/string_util.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" 9 #include "base/third_party/dynamic_annotations/dynamic_annotations.h"
10 #include "base/threading/platform_thread.h" 10 #include "base/threading/platform_thread.h"
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 if (new_eviction_) { 821 if (new_eviction_) {
822 EXPECT_EQ(net::OK, DoomAllEntries()); 822 EXPECT_EQ(net::OK, DoomAllEntries());
823 } 823 }
824 824
825 entry->Close(); // Trim the cache. 825 entry->Close(); // Trim the cache.
826 FlushQueueForTest(); 826 FlushQueueForTest();
827 827
828 // We may abort the eviction before cleaning up everything. 828 // We may abort the eviction before cleaning up everything.
829 MessageLoop::current()->RunAllPending(); 829 MessageLoop::current()->RunAllPending();
830 FlushQueueForTest(); 830 FlushQueueForTest();
831 ANNOTATE_IGNORE_READS_AND_WRITES_BEGIN();
831 EXPECT_GE(30, cache_->GetEntryCount()); 832 EXPECT_GE(30, cache_->GetEntryCount());
833 ANNOTATE_IGNORE_READS_AND_WRITES_END();
832 } 834 }
833 835
834 // We'll be leaking memory from this test. 836 // We'll be leaking memory from this test.
835 TEST_F(DiskCacheBackendTest, TrimInvalidEntry2) { 837 TEST_F(DiskCacheBackendTest, TrimInvalidEntry2) {
836 BackendTrimInvalidEntry2(); 838 BackendTrimInvalidEntry2();
837 } 839 }
838 840
839 // We'll be leaking memory from this test. 841 // We'll be leaking memory from this test.
840 TEST_F(DiskCacheBackendTest, NewEvictionTrimInvalidEntry2) { 842 TEST_F(DiskCacheBackendTest, NewEvictionTrimInvalidEntry2) {
841 SetNewEviction(); 843 SetNewEviction();
(...skipping 1636 matching lines...) Expand 10 before | Expand all | Expand 10 after
2478 // Ping the oldest entry. 2480 // Ping the oldest entry.
2479 cache_->OnExternalCacheHit("key0"); 2481 cache_->OnExternalCacheHit("key0");
2480 2482
2481 TrimForTest(false); 2483 TrimForTest(false);
2482 2484
2483 // Make sure the older key remains. 2485 // Make sure the older key remains.
2484 EXPECT_EQ(1, cache_->GetEntryCount()); 2486 EXPECT_EQ(1, cache_->GetEntryCount());
2485 ASSERT_EQ(net::OK, OpenEntry("key0", &entry)); 2487 ASSERT_EQ(net::OK, OpenEntry("key0", &entry));
2486 entry->Close(); 2488 entry->Close();
2487 } 2489 }
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