| Index: chrome/browser/sync_file_system/drive_backend/drive_file_sync_service_unittest.cc
|
| diff --git a/chrome/browser/sync_file_system/drive_backend/drive_file_sync_service_unittest.cc b/chrome/browser/sync_file_system/drive_backend/drive_file_sync_service_unittest.cc
|
| index 1b53de2ba22c1b387d352cf8f740eb4ad874b084..c107bdde3c2393addbdef491372ce70cc8745843 100644
|
| --- a/chrome/browser/sync_file_system/drive_backend/drive_file_sync_service_unittest.cc
|
| +++ b/chrome/browser/sync_file_system/drive_backend/drive_file_sync_service_unittest.cc
|
| @@ -4,13 +4,13 @@
|
|
|
| #include "chrome/browser/sync_file_system/drive_backend/drive_file_sync_service.h"
|
|
|
| -#include "base/message_loop/message_loop.h"
|
| +#include "base/bind.h"
|
| #include "base/message_loop/message_loop_proxy.h"
|
| +#include "base/run_loop.h"
|
| #include "chrome/browser/sync_file_system/drive_backend/drive_metadata_store.h"
|
| #include "chrome/browser/sync_file_system/drive_backend/fake_api_util.h"
|
| #include "chrome/browser/sync_file_system/sync_file_system.pb.h"
|
| #include "chrome/test/base/testing_profile.h"
|
| -#include "content/public/test/test_browser_thread.h"
|
| #include "content/public/test/test_browser_thread_bundle.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include "webkit/browser/fileapi/syncable/syncable_file_system_util.h"
|
| @@ -60,7 +60,7 @@ class DriveFileSyncServiceTest : public testing::Test {
|
| base_dir_, base::MessageLoopProxy::current().get());
|
| bool done = false;
|
| metadata_store_->Initialize(base::Bind(&DidInitialize, &done));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| metadata_store_->SetSyncRootDirectory(kSyncRootResourceId);
|
| EXPECT_TRUE(done);
|
|
|
| @@ -69,14 +69,14 @@ class DriveFileSyncServiceTest : public testing::Test {
|
| base_dir_,
|
| scoped_ptr<APIUtilInterface>(fake_api_util_),
|
| scoped_ptr<DriveMetadataStore>(metadata_store_)).Pass();
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| }
|
|
|
| virtual void TearDown() OVERRIDE {
|
| metadata_store_ = NULL;
|
| fake_api_util_ = NULL;
|
| sync_service_.reset();
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
|
|
| base_dir_ = base::FilePath();
|
| RevokeSyncableFileSystem();
|
| @@ -172,7 +172,7 @@ TEST_F(DriveFileSyncServiceTest, UninstallOrigin) {
|
| sync_service()->UninstallOrigin(
|
| origin_gurl,
|
| base::Bind(&ExpectEqStatus, &done, SYNC_STATUS_OK));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_TRUE(done);
|
|
|
| // Assert the App's origin folder was marked as deleted.
|
| @@ -194,7 +194,7 @@ TEST_F(DriveFileSyncServiceTest, UninstallOriginWithoutOriginDirectory) {
|
| sync_service()->UninstallOrigin(
|
| origin_gurl,
|
| base::Bind(&ExpectEqStatus, &done, SYNC_STATUS_OK));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_TRUE(done);
|
|
|
| // Assert the App's origin folder does not exist.
|
| @@ -215,7 +215,7 @@ TEST_F(DriveFileSyncServiceTest, DisableOriginForTrackingChangesPendingOrigin) {
|
| // Pending origins that are disabled are dropped and do not go to disabled.
|
| sync_service()->DisableOriginForTrackingChanges(origin,
|
| base::Bind(&ExpectOkStatus));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| ASSERT_TRUE(VerifyOriginStatusCount(0u, 0u, 0u));
|
| }
|
|
|
| @@ -229,7 +229,7 @@ TEST_F(DriveFileSyncServiceTest,
|
|
|
| sync_service()->DisableOriginForTrackingChanges(origin,
|
| base::Bind(&ExpectOkStatus));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| ASSERT_TRUE(VerifyOriginStatusCount(0u, 0u, 1u));
|
| }
|
|
|
| @@ -246,7 +246,7 @@ TEST_F(DriveFileSyncServiceTest, EnableOriginForTrackingChanges) {
|
| // origins > 0.
|
| sync_service()->EnableOriginForTrackingChanges(origin,
|
| base::Bind(&ExpectOkStatus));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| ASSERT_TRUE(VerifyOriginStatusCount(0u, 1u, 0u));
|
| }
|
|
|
|
|