| 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/sync_engine.h" | 5 #include "chrome/browser/sync_file_system/drive_backend/sync_engine.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
| 26 | 26 |
| 27 namespace sync_file_system { | 27 namespace sync_file_system { |
| 28 namespace drive_backend { | 28 namespace drive_backend { |
| 29 | 29 |
| 30 class SyncEngineTest : public testing::Test, | 30 class SyncEngineTest : public testing::Test, |
| 31 public base::SupportsWeakPtr<SyncEngineTest> { | 31 public base::SupportsWeakPtr<SyncEngineTest> { |
| 32 public: | 32 public: |
| 33 typedef RemoteFileSyncService::OriginStatusMap RemoteOriginStatusMap; | 33 typedef RemoteFileSyncService::OriginStatusMap RemoteOriginStatusMap; |
| 34 | 34 |
| 35 SyncEngineTest() : worker_pool_owner_(1, "Worker") {} | 35 SyncEngineTest() : worker_pool_owner_(2, "Worker") {} |
| 36 ~SyncEngineTest() override {} | 36 ~SyncEngineTest() override {} |
| 37 | 37 |
| 38 void SetUp() override { | 38 void SetUp() override { |
| 39 ASSERT_TRUE(profile_dir_.CreateUniqueTempDir()); | 39 ASSERT_TRUE(profile_dir_.CreateUniqueTempDir()); |
| 40 | 40 |
| 41 std::unique_ptr<drive::DriveServiceInterface> fake_drive_service( | 41 std::unique_ptr<drive::DriveServiceInterface> fake_drive_service( |
| 42 new drive::FakeDriveService); | 42 new drive::FakeDriveService); |
| 43 | 43 |
| 44 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner = | 44 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner = |
| 45 base::ThreadTaskRunnerHandle::Get(); | 45 base::ThreadTaskRunnerHandle::Get(); |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 TEST_F(SyncEngineTest, ProcessRemoteChange) { | 227 TEST_F(SyncEngineTest, ProcessRemoteChange) { |
| 228 SyncStatusCode sync_status; | 228 SyncStatusCode sync_status; |
| 229 storage::FileSystemURL url; | 229 storage::FileSystemURL url; |
| 230 sync_engine()->ProcessRemoteChange(CreateResultReceiver(&sync_status, &url)); | 230 sync_engine()->ProcessRemoteChange(CreateResultReceiver(&sync_status, &url)); |
| 231 WaitForWorkerTaskRunner(); | 231 WaitForWorkerTaskRunner(); |
| 232 EXPECT_EQ(SYNC_STATUS_OK, sync_status); | 232 EXPECT_EQ(SYNC_STATUS_OK, sync_status); |
| 233 } | 233 } |
| 234 | 234 |
| 235 } // namespace drive_backend | 235 } // namespace drive_backend |
| 236 } // namespace sync_file_system | 236 } // namespace sync_file_system |
| OLD | NEW |