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

Unified Diff: chrome/browser/sync_file_system/sync_file_system_service_unittest.cc

Issue 2564943002: Reland "Add thread checking to RunLoop, deprecate MessageLoopRunner. (patchset #4 id:20002 of https… (Closed)
Patch Set: Created 4 years 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/sync_file_system/sync_file_system_service_unittest.cc
diff --git a/chrome/browser/sync_file_system/sync_file_system_service_unittest.cc b/chrome/browser/sync_file_system/sync_file_system_service_unittest.cc
index c4d0035d7aadc7cb1d402e11226285426421adf6..84752198d2f82a5775d749e0d9b9c5ea55294420 100644
--- a/chrome/browser/sync_file_system/sync_file_system_service_unittest.cc
+++ b/chrome/browser/sync_file_system/sync_file_system_service_unittest.cc
@@ -73,12 +73,11 @@ void AssignValueAndQuit(base::RunLoop* run_loop,
run_loop->Quit();
}
-// This is called on IO thread.
-void VerifyFileError(base::RunLoop* run_loop,
+// This is called on IO thread. Posts |callback| to be called on UI thread.
+void VerifyFileError(base::Closure callback,
base::File::Error error) {
- DCHECK(run_loop);
EXPECT_EQ(base::File::FILE_OK, error);
- run_loop->Quit();
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, callback);
}
} // namespace
@@ -430,7 +429,7 @@ TEST_F(SyncFileSystemServiceTest, SimpleSyncFlowWithFileBusy) {
base::Bind(&CannedSyncableFileSystem::DoCreateFile,
base::Unretained(file_system_.get()),
kFile, base::Bind(&VerifyFileError,
- &verify_file_error_run_loop)));
+ verify_file_error_run_loop.QuitClosure())));
run_loop.Run();
« no previous file with comments | « chrome/browser/sync/test/integration/dictionary_helper.cc ('k') | chrome/browser/ui/views/ash/tab_scrubber_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698