summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/entry_unittest.cc
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-21 23:29:30 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-21 23:29:30 +0000
commit8de085c2e13472dd46deba6e774ee0805c811a0e (patch)
tree129edc14c9b174c95cd4a258de9b72ab1d7b5a6c /net/disk_cache/entry_unittest.cc
parentf6b349bf6ffb8ebef35c8c536b9cf3792963d01c (diff)
downloadchromium_src-8de085c2e13472dd46deba6e774ee0805c811a0e.zip
chromium_src-8de085c2e13472dd46deba6e774ee0805c811a0e.tar.gz
chromium_src-8de085c2e13472dd46deba6e774ee0805c811a0e.tar.bz2
Disk cache: add a delay after TruncateData unit test to wait for IO completions.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1200 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/entry_unittest.cc')
-rw-r--r--net/disk_cache/entry_unittest.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/disk_cache/entry_unittest.cc b/net/disk_cache/entry_unittest.cc
index d3bece1..0bbe16d 100644
--- a/net/disk_cache/entry_unittest.cc
+++ b/net/disk_cache/entry_unittest.cc
@@ -564,6 +564,11 @@ void DiskCacheEntryTest::TruncateData() {
TEST_F(DiskCacheEntryTest, TruncateData) {
InitCache();
TruncateData();
+
+ // We generate asynchronous IO that is not really tracked until completion
+ // so we just wait here before running the next test.
+ MessageLoopHelper helper;
+ helper.WaitUntilCacheIoFinished(1);
}
TEST_F(DiskCacheEntryTest, MemoryOnlyTruncateData) {