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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 fake_api_util_(NULL), | 52 fake_api_util_(NULL), |
53 fake_remote_processor_(NULL), | 53 fake_remote_processor_(NULL), |
54 metadata_store_(NULL), | 54 metadata_store_(NULL), |
55 resource_count_(0) {} | 55 resource_count_(0) {} |
56 | 56 |
57 virtual ~DriveFileSyncServiceSyncTest() { | 57 virtual ~DriveFileSyncServiceSyncTest() { |
58 } | 58 } |
59 | 59 |
60 virtual void SetUp() OVERRIDE { | 60 virtual void SetUp() OVERRIDE { |
61 SetEnableSyncFSDirectoryOperation(true); | 61 SetEnableSyncFSDirectoryOperation(true); |
62 RegisterSyncableFileSystem(DriveFileSyncService::kServiceName); | 62 RegisterSyncableFileSystem(); |
63 } | 63 } |
64 | 64 |
65 virtual void TearDown() OVERRIDE { | 65 virtual void TearDown() OVERRIDE { |
66 RevokeSyncableFileSystem(DriveFileSyncService::kServiceName); | 66 RevokeSyncableFileSystem(); |
67 SetEnableSyncFSDirectoryOperation(false); | 67 SetEnableSyncFSDirectoryOperation(false); |
68 } | 68 } |
69 | 69 |
70 protected: | 70 protected: |
71 struct SyncEvent { | 71 struct SyncEvent { |
72 std::string description; | 72 std::string description; |
73 base::Closure callback; | 73 base::Closure callback; |
74 | 74 |
75 SyncEvent(const std::string& description, | 75 SyncEvent(const std::string& description, |
76 base::Closure callback) | 76 base::Closure callback) |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 TEST_F(DriveFileSyncServiceSyncTest, DeleteDirectoryTest) { | 436 TEST_F(DriveFileSyncServiceSyncTest, DeleteDirectoryTest) { |
437 std::string kDir = "dir title"; | 437 std::string kDir = "dir title"; |
438 SyncEvent sync_event[] = { | 438 SyncEvent sync_event[] = { |
439 CreateRemoteDirectoryAddEvent(kDir), | 439 CreateRemoteDirectoryAddEvent(kDir), |
440 CreateRemoteFileDeleteEvent(kDir), | 440 CreateRemoteFileDeleteEvent(kDir), |
441 }; | 441 }; |
442 RunTest(CreateTestCase(sync_event)); | 442 RunTest(CreateTestCase(sync_event)); |
443 } | 443 } |
444 | 444 |
445 } // namespace sync_file_system | 445 } // namespace sync_file_system |
OLD | NEW |