OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef COMPONENTS_SYNC_SYNCABLE_DIRECTORY_UNITTEST_H_ | 5 #ifndef COMPONENTS_SYNC_SYNCABLE_DIRECTORY_UNITTEST_H_ |
6 #define COMPONENTS_SYNC_SYNCABLE_DIRECTORY_UNITTEST_H_ | 6 #define COMPONENTS_SYNC_SYNCABLE_DIRECTORY_UNITTEST_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | |
11 #include <string> | 10 #include <string> |
12 | 11 |
13 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
14 #include "components/sync/base/fake_encryptor.h" | 13 #include "components/sync/base/fake_encryptor.h" |
15 #include "components/sync/base/test_unrecoverable_error_handler.h" | 14 #include "components/sync/base/test_unrecoverable_error_handler.h" |
16 #include "components/sync/syncable/in_memory_directory_backing_store.h" | 15 #include "components/sync/syncable/in_memory_directory_backing_store.h" |
17 #include "components/sync/syncable/mutable_entry.h" | 16 #include "components/sync/syncable/mutable_entry.h" |
18 #include "components/sync/syncable/syncable_read_transaction.h" | 17 #include "components/sync/syncable/syncable_read_transaction.h" |
19 #include "components/sync/syncable/syncable_write_transaction.h" | 18 #include "components/sync/syncable/syncable_write_transaction.h" |
20 #include "components/sync/test/engine/test_id_factory.h" | 19 #include "components/sync/test/engine/test_id_factory.h" |
21 #include "components/sync/test/null_directory_change_delegate.h" | 20 #include "components/sync/test/null_directory_change_delegate.h" |
22 #include "components/sync/test/null_transaction_observer.h" | 21 #include "components/sync/test/null_transaction_observer.h" |
23 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
24 | 23 |
25 namespace syncer { | 24 namespace syncer { |
| 25 |
26 namespace syncable { | 26 namespace syncable { |
27 | 27 |
28 class BaseTransaction; | 28 class BaseTransaction; |
29 | 29 |
30 // A test fixture for syncable::Directory. Uses an in-memory database to keep | 30 // A test fixture for syncable::Directory. Uses an in-memory database to keep |
31 // the unit tests fast. | 31 // the unit tests fast. |
32 // | 32 // |
33 // Serves as base class for several other test fixtures. | 33 // Serves as base class for several other test fixtures. |
34 class SyncableDirectoryTest : public testing::Test { | 34 class SyncableDirectoryTest : public testing::Test { |
35 protected: | 35 protected: |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 base::MessageLoop message_loop_; | 103 base::MessageLoop message_loop_; |
104 std::unique_ptr<Directory> dir_; | 104 std::unique_ptr<Directory> dir_; |
105 NullDirectoryChangeDelegate delegate_; | 105 NullDirectoryChangeDelegate delegate_; |
106 FakeEncryptor encryptor_; | 106 FakeEncryptor encryptor_; |
107 TestUnrecoverableErrorHandler handler_; | 107 TestUnrecoverableErrorHandler handler_; |
108 sql::Connection connection_; | 108 sql::Connection connection_; |
109 }; | 109 }; |
110 | 110 |
111 } // namespace syncable | 111 } // namespace syncable |
| 112 |
112 } // namespace syncer | 113 } // namespace syncer |
113 | 114 |
114 #endif // COMPONENTS_SYNC_SYNCABLE_DIRECTORY_UNITTEST_H_ | 115 #endif // COMPONENTS_SYNC_SYNCABLE_DIRECTORY_UNITTEST_H_ |
OLD | NEW |