| 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 SYNC_SYNCABLE_DIRECTORY_UNITTEST_H_ | 5 #ifndef SYNC_SYNCABLE_DIRECTORY_UNITTEST_H_ |
| 6 #define SYNC_SYNCABLE_DIRECTORY_UNITTEST_H_ | 6 #define SYNC_SYNCABLE_DIRECTORY_UNITTEST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 // A test fixture for syncable::Directory. Uses an in-memory database to keep | 29 // A test fixture for syncable::Directory. Uses an in-memory database to keep |
| 30 // the unit tests fast. | 30 // the unit tests fast. |
| 31 // | 31 // |
| 32 // Serves as base class for several other test fixtures. | 32 // Serves as base class for several other test fixtures. |
| 33 class SyncableDirectoryTest : public testing::Test { | 33 class SyncableDirectoryTest : public testing::Test { |
| 34 protected: | 34 protected: |
| 35 static const char kDirectoryName[]; | 35 static const char kDirectoryName[]; |
| 36 | 36 |
| 37 SyncableDirectoryTest(); | 37 SyncableDirectoryTest(); |
| 38 virtual ~SyncableDirectoryTest(); | 38 ~SyncableDirectoryTest() override; |
| 39 | 39 |
| 40 virtual void SetUp(); | 40 void SetUp() override; |
| 41 virtual void TearDown(); | 41 void TearDown() override; |
| 42 | 42 |
| 43 // Destroys any currently opened directory, creates and opens a new one. | 43 // Destroys any currently opened directory, creates and opens a new one. |
| 44 // | 44 // |
| 45 // Returns result of the Open call. | 45 // Returns result of the Open call. |
| 46 DirOpenResult ReopenDirectory(); | 46 DirOpenResult ReopenDirectory(); |
| 47 | 47 |
| 48 // Creates an empty entry and sets the ID field to a default one. | 48 // Creates an empty entry and sets the ID field to a default one. |
| 49 void CreateEntry(const ModelType& model_type, const std::string& entryname); | 49 void CreateEntry(const ModelType& model_type, const std::string& entryname); |
| 50 | 50 |
| 51 // Creates an empty entry and sets the ID field to id. | 51 // Creates an empty entry and sets the ID field to id. |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 FakeEncryptor encryptor_; | 105 FakeEncryptor encryptor_; |
| 106 TestUnrecoverableErrorHandler handler_; | 106 TestUnrecoverableErrorHandler handler_; |
| 107 sql::Connection connection_; | 107 sql::Connection connection_; |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 } // namespace syncable | 110 } // namespace syncable |
| 111 | 111 |
| 112 } // namespace syncer | 112 } // namespace syncer |
| 113 | 113 |
| 114 #endif // SYNC_SYNCABLE_DIRECTORY_UNITTEST_H_ | 114 #endif // SYNC_SYNCABLE_DIRECTORY_UNITTEST_H_ |
| OLD | NEW |