| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_file_sync_service.h" | 5 #include "chrome/browser/sync_file_system/drive_file_sync_service.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "chrome/browser/sync_file_system/drive_metadata_store.h" | 8 #include "chrome/browser/sync_file_system/drive_metadata_store.h" |
| 9 #include "chrome/browser/sync_file_system/fake_drive_file_sync_client.h" | 9 #include "chrome/browser/sync_file_system/fake_drive_file_sync_client.h" |
| 10 #include "chrome/browser/sync_file_system/sync_file_system.pb.h" | 10 #include "chrome/browser/sync_file_system/sync_file_system.pb.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 message_loop_.RunUntilIdle(); | 74 message_loop_.RunUntilIdle(); |
| 75 | 75 |
| 76 base_dir_ = base::FilePath(); | 76 base_dir_ = base::FilePath(); |
| 77 ASSERT_TRUE(RevokeSyncableFileSystem(kServiceName)); | 77 ASSERT_TRUE(RevokeSyncableFileSystem(kServiceName)); |
| 78 } | 78 } |
| 79 | 79 |
| 80 virtual ~DriveFileSyncServiceTest() { | 80 virtual ~DriveFileSyncServiceTest() { |
| 81 } | 81 } |
| 82 | 82 |
| 83 protected: | 83 protected: |
| 84 MessageLoop* message_loop() { return &message_loop_; } | 84 base::MessageLoop* message_loop() { return &message_loop_; } |
| 85 FakeDriveFileSyncClient* fake_sync_client() { return fake_sync_client_; } | 85 FakeDriveFileSyncClient* fake_sync_client() { return fake_sync_client_; } |
| 86 DriveMetadataStore* metadata_store() { return metadata_store_; } | 86 DriveMetadataStore* metadata_store() { return metadata_store_; } |
| 87 DriveFileSyncService* sync_service() { return sync_service_.get(); } | 87 DriveFileSyncService* sync_service() { return sync_service_.get(); } |
| 88 | 88 |
| 89 private: | 89 private: |
| 90 base::ScopedTempDir scoped_base_dir_; | 90 base::ScopedTempDir scoped_base_dir_; |
| 91 MessageLoop message_loop_; | 91 base::MessageLoop message_loop_; |
| 92 content::TestBrowserThread ui_thread_; | 92 content::TestBrowserThread ui_thread_; |
| 93 content::TestBrowserThread file_thread_; | 93 content::TestBrowserThread file_thread_; |
| 94 | 94 |
| 95 TestingProfile profile_; | 95 TestingProfile profile_; |
| 96 base::FilePath base_dir_; | 96 base::FilePath base_dir_; |
| 97 | 97 |
| 98 FakeDriveFileSyncClient* fake_sync_client_; // Owned by |sync_service_|. | 98 FakeDriveFileSyncClient* fake_sync_client_; // Owned by |sync_service_|. |
| 99 DriveMetadataStore* metadata_store_; // Owned by |sync_service_|. | 99 DriveMetadataStore* metadata_store_; // Owned by |sync_service_|. |
| 100 | 100 |
| 101 scoped_ptr<DriveFileSyncService> sync_service_; | 101 scoped_ptr<DriveFileSyncService> sync_service_; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 121 base::Bind(&ExpectEqStatus, &done, SYNC_STATUS_OK)); | 121 base::Bind(&ExpectEqStatus, &done, SYNC_STATUS_OK)); |
| 122 message_loop()->RunUntilIdle(); | 122 message_loop()->RunUntilIdle(); |
| 123 EXPECT_TRUE(done); | 123 EXPECT_TRUE(done); |
| 124 | 124 |
| 125 // Assert the App's origin folder was marked as deleted. | 125 // Assert the App's origin folder was marked as deleted. |
| 126 EXPECT_TRUE(fake_sync_client()->remote_resources() | 126 EXPECT_TRUE(fake_sync_client()->remote_resources() |
| 127 .find(origin_dir_resource_id)->second.deleted); | 127 .find(origin_dir_resource_id)->second.deleted); |
| 128 } | 128 } |
| 129 | 129 |
| 130 } // namespace sync_file_system | 130 } // namespace sync_file_system |
| OLD | NEW |