| Index: chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc
|
| diff --git a/chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc b/chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc
|
| index 329be21543c20d48e459d851213c39601328e975..f709ec8d157948886e372c020c9de6a490e1f2af 100644
|
| --- a/chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc
|
| +++ b/chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc
|
| @@ -15,6 +15,7 @@
|
| #include "base/location.h"
|
| #include "base/macros.h"
|
| #include "base/message_loop/message_loop.h"
|
| +#include "base/run_loop.h"
|
| #include "base/single_thread_task_runner.h"
|
| #include "base/stl_util.h"
|
| #include "base/threading/thread_task_runner_handle.h"
|
| @@ -106,7 +107,7 @@ class LocalFileSyncContextTest : public testing::Test {
|
| storage::ScopedFile* snapshot) {
|
| StartPrepareForSync(file_system_context, url, sync_mode,
|
| metadata, changes, snapshot);
|
| - base::MessageLoop::current()->Run();
|
| + base::RunLoop().Run();
|
| return status_;
|
| }
|
|
|
| @@ -162,7 +163,7 @@ class LocalFileSyncContextTest : public testing::Test {
|
| base::Bind(&LocalFileSyncContextTest::DidApplyRemoteChange,
|
| base::Unretained(this),
|
| base::RetainedRef(file_system_context), url));
|
| - base::MessageLoop::current()->Run();
|
| + base::RunLoop().Run();
|
| return status_;
|
| }
|
|
|
| @@ -197,7 +198,7 @@ class LocalFileSyncContextTest : public testing::Test {
|
|
|
| base::File::Error WaitUntilModifyFileIsDone() {
|
| while (!async_modify_finished_)
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| return file_error_;
|
| }
|
|
|
| @@ -326,7 +327,7 @@ class LocalFileSyncContextTest : public testing::Test {
|
| // Write should succeed.
|
| EXPECT_EQ(base::File::FILE_OK, WaitUntilModifyFileIsDone());
|
| } else {
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_FALSE(async_modify_finished_);
|
| }
|
|
|
| @@ -583,7 +584,7 @@ TEST_F(LocalFileSyncContextTest, DISABLED_PrepareSyncWhileWriting) {
|
|
|
| // The PrepareForSync must have been started; wait until DidPrepareForSync
|
| // is done.
|
| - base::MessageLoop::current()->Run();
|
| + base::RunLoop().Run();
|
| ASSERT_FALSE(has_inflight_prepare_for_sync_);
|
|
|
| // Now PrepareForSync should have run and returned OK.
|
|
|