| Index: chrome/browser/sync_file_system/local/syncable_file_operation_runner_unittest.cc
|
| diff --git a/chrome/browser/sync_file_system/local/syncable_file_operation_runner_unittest.cc b/chrome/browser/sync_file_system/local/syncable_file_operation_runner_unittest.cc
|
| index dfad2be652fe808e77eb39d519f37cdb481ef2a1..b414f7884910f461e91f5a6ebc27c19c5cb3911a 100644
|
| --- a/chrome/browser/sync_file_system/local/syncable_file_operation_runner_unittest.cc
|
| +++ b/chrome/browser/sync_file_system/local/syncable_file_operation_runner_unittest.cc
|
| @@ -327,7 +327,7 @@ TEST_F(SyncableFileOperationRunnerTest, Write) {
|
| ResetCallbackStatus();
|
|
|
| while (!write_complete_)
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
|
|
| EXPECT_EQ(File::FILE_OK, write_status_);
|
| EXPECT_EQ(kData.size(), write_bytes_);
|
| @@ -345,7 +345,7 @@ TEST_F(SyncableFileOperationRunnerTest, QueueAndCancel) {
|
| file_system_.operation_runner()->Truncate(
|
| URL(kFile), 1,
|
| ExpectStatus(FROM_HERE, File::FILE_ERROR_ABORT));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_EQ(0, callback_count_);
|
|
|
| ResetCallbackStatus();
|
| @@ -353,7 +353,7 @@ TEST_F(SyncableFileOperationRunnerTest, QueueAndCancel) {
|
| // This shouldn't crash nor leak memory.
|
| sync_context_->ShutdownOnUIThread();
|
| sync_context_ = nullptr;
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_EQ(2, callback_count_);
|
| }
|
|
|
| @@ -375,7 +375,7 @@ TEST_F(SyncableFileOperationRunnerTest, CopyInForeignFile) {
|
| file_system_.operation_runner()->CopyInForeignFile(
|
| temp_path, URL(kFile),
|
| ExpectStatus(FROM_HERE, File::FILE_OK));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_EQ(0, callback_count_);
|
|
|
| // End syncing (to enable write).
|
| @@ -383,7 +383,7 @@ TEST_F(SyncableFileOperationRunnerTest, CopyInForeignFile) {
|
| ASSERT_TRUE(sync_status()->IsWritable(URL(kFile)));
|
|
|
| ResetCallbackStatus();
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_EQ(1, callback_count_);
|
|
|
| // Now the file must have been created and have the same content as temp_path.
|
| @@ -391,7 +391,7 @@ TEST_F(SyncableFileOperationRunnerTest, CopyInForeignFile) {
|
| file_system_.DoVerifyFile(
|
| URL(kFile), kTestData,
|
| ExpectStatus(FROM_HERE, File::FILE_OK));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_EQ(1, callback_count_);
|
| }
|
|
|
| @@ -400,7 +400,7 @@ TEST_F(SyncableFileOperationRunnerTest, Cancel) {
|
| file_system_.operation_runner()->CreateFile(
|
| URL(kFile), false /* exclusive */,
|
| ExpectStatus(FROM_HERE, File::FILE_OK));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_EQ(1, callback_count_);
|
|
|
| // Run Truncate and immediately cancel. This shouldn't crash.
|
|
|