| 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 "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 216 |
| 217 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_data); ++i) { | 217 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_data); ++i) { |
| 218 PostUpdateServiceState(test_data[i].state, test_data[i].description); | 218 PostUpdateServiceState(test_data[i].state, test_data[i].description); |
| 219 EXPECT_EQ(test_data[i].state, sync_engine()->GetCurrentState()) | 219 EXPECT_EQ(test_data[i].state, sync_engine()->GetCurrentState()) |
| 220 << "Expected state: REMOTE_SERVICE_" << test_data[i].description; | 220 << "Expected state: REMOTE_SERVICE_" << test_data[i].description; |
| 221 } | 221 } |
| 222 } | 222 } |
| 223 | 223 |
| 224 TEST_F(SyncEngineTest, ProcessRemoteChange) { | 224 TEST_F(SyncEngineTest, ProcessRemoteChange) { |
| 225 SyncStatusCode sync_status; | 225 SyncStatusCode sync_status; |
| 226 fileapi::FileSystemURL url; | 226 storage::FileSystemURL url; |
| 227 sync_engine()->ProcessRemoteChange(CreateResultReceiver(&sync_status, &url)); | 227 sync_engine()->ProcessRemoteChange(CreateResultReceiver(&sync_status, &url)); |
| 228 WaitForWorkerTaskRunner(); | 228 WaitForWorkerTaskRunner(); |
| 229 EXPECT_EQ(SYNC_STATUS_OK, sync_status); | 229 EXPECT_EQ(SYNC_STATUS_OK, sync_status); |
| 230 } | 230 } |
| 231 | 231 |
| 232 } // namespace drive_backend | 232 } // namespace drive_backend |
| 233 } // namespace sync_file_system | 233 } // namespace sync_file_system |
| OLD | NEW |