diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-26 22:13:42 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-26 22:13:42 +0000 |
commit | cd8c0049d2ba8bce7f8022e5a333f1cbc15e7e82 (patch) | |
tree | 7699727246663f404cf61d7a95f44b4b6844b79a /net | |
parent | cae144058fea014bbdaf646402bc97a7e721ca21 (diff) | |
download | chromium_src-cd8c0049d2ba8bce7f8022e5a333f1cbc15e7e82.zip chromium_src-cd8c0049d2ba8bce7f8022e5a333f1cbc15e7e82.tar.gz chromium_src-cd8c0049d2ba8bce7f8022e5a333f1cbc15e7e82.tar.bz2 |
Disk cache: Fix the synchronization of BackendTrimInvalidEntry2.
BUG=none
TEST=Tsan should be happy.
TBR=gavinp@chromium.org
Review URL: http://codereview.chromium.org/8400004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107446 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/disk_cache/backend_unittest.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/disk_cache/backend_unittest.cc b/net/disk_cache/backend_unittest.cc index 8188894..fe249f2 100644 --- a/net/disk_cache/backend_unittest.cc +++ b/net/disk_cache/backend_unittest.cc @@ -812,6 +812,7 @@ void DiskCacheBackendTest::BackendTrimInvalidEntry2() { ASSERT_EQ(net::OK, CreateEntry("Something else", &entry)); EXPECT_EQ(kSize, WriteData(entry, 0, 0, buffer, kSize, false)); + FlushQueueForTest(); EXPECT_EQ(33, cache_->GetEntryCount()); SetMaxSize(kSize); @@ -826,6 +827,7 @@ void DiskCacheBackendTest::BackendTrimInvalidEntry2() { // We may abort the eviction before cleaning up everything. MessageLoop::current()->RunAllPending(); + FlushQueueForTest(); EXPECT_GE(30, cache_->GetEntryCount()); } |