| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/sync_file_system/drive_backend/register_app_task.h" | 5 #include "chrome/browser/sync_file_system/drive_backend/register_app_task.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 base::MessageLoopProxy::current())); | 54 base::MessageLoopProxy::current())); |
| 55 | 55 |
| 56 fake_drive_service_helper_.reset(new FakeDriveServiceHelper( | 56 fake_drive_service_helper_.reset(new FakeDriveServiceHelper( |
| 57 fake_drive_service.get(), drive_uploader.get(), | 57 fake_drive_service.get(), drive_uploader.get(), |
| 58 kSyncRootFolderTitle)); | 58 kSyncRootFolderTitle)); |
| 59 | 59 |
| 60 context_.reset( | 60 context_.reset( |
| 61 new SyncEngineContext( | 61 new SyncEngineContext( |
| 62 fake_drive_service.PassAs<drive::DriveServiceInterface>(), | 62 fake_drive_service.PassAs<drive::DriveServiceInterface>(), |
| 63 drive_uploader.Pass(), | 63 drive_uploader.Pass(), |
| 64 NULL, |
| 64 base::MessageLoopProxy::current(), | 65 base::MessageLoopProxy::current(), |
| 65 base::MessageLoopProxy::current(), | 66 base::MessageLoopProxy::current(), |
| 66 base::MessageLoopProxy::current())); | 67 base::MessageLoopProxy::current())); |
| 67 | 68 |
| 68 ASSERT_EQ(google_apis::HTTP_CREATED, | 69 ASSERT_EQ(google_apis::HTTP_CREATED, |
| 69 fake_drive_service_helper_->AddOrphanedFolder( | 70 fake_drive_service_helper_->AddOrphanedFolder( |
| 70 kSyncRootFolderTitle, &sync_root_folder_id_)); | 71 kSyncRootFolderTitle, &sync_root_folder_id_)); |
| 71 } | 72 } |
| 72 | 73 |
| 73 virtual void TearDown() OVERRIDE { | 74 virtual void TearDown() OVERRIDE { |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 | 310 |
| 310 CreateMetadataDatabase(db.Pass()); | 311 CreateMetadataDatabase(db.Pass()); |
| 311 RunRegisterAppTask(kAppID); | 312 RunRegisterAppTask(kAppID); |
| 312 | 313 |
| 313 EXPECT_EQ(1u, CountRegisteredAppRoot()); | 314 EXPECT_EQ(1u, CountRegisteredAppRoot()); |
| 314 EXPECT_TRUE(IsAppRegistered(kAppID)); | 315 EXPECT_TRUE(IsAppRegistered(kAppID)); |
| 315 } | 316 } |
| 316 | 317 |
| 317 } // namespace drive_backend | 318 } // namespace drive_backend |
| 318 } // namespace sync_file_system | 319 } // namespace sync_file_system |
| OLD | NEW |