OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 run_loop.Run(); | 197 run_loop.Run(); |
198 return sync_status; | 198 return sync_status; |
199 } | 199 } |
200 | 200 |
201 int64 GetNumChangesInTracker() const { | 201 int64 GetNumChangesInTracker() const { |
202 return file_system_->file_system_context()->change_tracker()->num_changes(); | 202 return file_system_->file_system_context()->change_tracker()->num_changes(); |
203 } | 203 } |
204 | 204 |
205 MultiThreadTestHelper thread_helper_; | 205 MultiThreadTestHelper thread_helper_; |
206 | 206 |
207 ScopedTempDir temp_dir_; | 207 base::ScopedTempDir temp_dir_; |
208 | 208 |
209 scoped_ptr<fileapi::CannedSyncableFileSystem> file_system_; | 209 scoped_ptr<fileapi::CannedSyncableFileSystem> file_system_; |
210 scoped_ptr<LocalFileSyncService> local_service_; | 210 scoped_ptr<LocalFileSyncService> local_service_; |
211 | 211 |
212 int64 num_changes_; | 212 int64 num_changes_; |
213 }; | 213 }; |
214 | 214 |
215 // More complete tests for PrepareForProcessRemoteChange and ApplyRemoteChange | 215 // More complete tests for PrepareForProcessRemoteChange and ApplyRemoteChange |
216 // are also in content_unittest:LocalFileSyncContextTest. | 216 // are also in content_unittest:LocalFileSyncContextTest. |
217 TEST_F(LocalFileSyncServiceTest, RemoteSyncStepsSimple) { | 217 TEST_F(LocalFileSyncServiceTest, RemoteSyncStepsSimple) { |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 | 521 |
522 EXPECT_EQ(fileapi::SYNC_STATUS_OK, status); | 522 EXPECT_EQ(fileapi::SYNC_STATUS_OK, status); |
523 EXPECT_EQ(kTime, metadata.last_modified); | 523 EXPECT_EQ(kTime, metadata.last_modified); |
524 EXPECT_EQ(kSize, metadata.size); | 524 EXPECT_EQ(kSize, metadata.size); |
525 } | 525 } |
526 | 526 |
527 // TODO(kinuko): Add tests for multiple file changes and multiple | 527 // TODO(kinuko): Add tests for multiple file changes and multiple |
528 // FileSystemContexts. | 528 // FileSystemContexts. |
529 | 529 |
530 } // namespace sync_file_system | 530 } // namespace sync_file_system |
OLD | NEW |