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

Unified Diff: chrome/browser/chromeos/drive/file_cache_unittest.cc

Issue 408153003: Simplify RunTaskOnThread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix FileCacheTest Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/drive/file_cache_unittest.cc
diff --git a/chrome/browser/chromeos/drive/file_cache_unittest.cc b/chrome/browser/chromeos/drive/file_cache_unittest.cc
index cb98fa7d01ba91cb2b539c67df90f03114ff4a99..8fcd6cadf66e4cd2950fde6985ff7e91f9148d89 100644
--- a/chrome/browser/chromeos/drive/file_cache_unittest.cc
+++ b/chrome/browser/chromeos/drive/file_cache_unittest.cc
@@ -381,6 +381,7 @@ TEST_F(FileCacheTest, OpenForWrite) {
// Close (1).
file_closer1.reset();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(cache_->IsOpenedForWrite(id));
// last_modified is updated.
@@ -389,6 +390,7 @@ TEST_F(FileCacheTest, OpenForWrite) {
// Close (2).
file_closer2.reset();
+ base::RunLoop().RunUntilIdle();
EXPECT_FALSE(cache_->IsOpenedForWrite(id));
// Try to open non-existent file.
@@ -424,6 +426,7 @@ TEST_F(FileCacheTest, UpdateMd5) {
// Close file.
file_closer.reset();
+ base::RunLoop().RunUntilIdle();
// MD5 was cleared by OpenForWrite().
EXPECT_EQ(FILE_ERROR_OK, metadata_storage_->GetEntry(id, &entry));
@@ -461,6 +464,7 @@ TEST_F(FileCacheTest, ClearDirty) {
// Close the file and clear the dirty bit.
file_closer.reset();
+ base::RunLoop().RunUntilIdle();
EXPECT_EQ(FILE_ERROR_OK, cache_->ClearDirty(id));
// Entry is not dirty.
« no previous file with comments | « chrome/browser/chromeos/drive/file_cache.cc ('k') | chrome/browser/chromeos/drive/fileapi/async_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698