| 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 // A handy class that takes care of setting up and destroying a | 5 // A handy class that takes care of setting up and destroying a |
| 6 // UserShare instance for unit tests that require one. | 6 // UserShare instance for unit tests that require one. |
| 7 // | 7 // |
| 8 // The expected usage is to make this a component of your test fixture: | 8 // The expected usage is to make this a component of your test fixture: |
| 9 // | 9 // |
| 10 // class AwesomenessTest : public testing::Test { | 10 // class AwesomenessTest : public testing::Test { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 // Sync's encryption handler. Used by tests to invoke the sync encryption | 69 // Sync's encryption handler. Used by tests to invoke the sync encryption |
| 70 // methods normally handled via the SyncBackendHost | 70 // methods normally handled via the SyncBackendHost |
| 71 SyncEncryptionHandler* encryption_handler(); | 71 SyncEncryptionHandler* encryption_handler(); |
| 72 | 72 |
| 73 // Returns the directory's transaction observer. This transaction observer | 73 // Returns the directory's transaction observer. This transaction observer |
| 74 // has methods which can be helpful when writing test assertions. | 74 // has methods which can be helpful when writing test assertions. |
| 75 syncable::TestTransactionObserver* transaction_observer(); | 75 syncable::TestTransactionObserver* transaction_observer(); |
| 76 | 76 |
| 77 // A helper function to pretend to download this type's root node. | 77 // A helper function to pretend to download this type's root node. |
| 78 static bool CreateRoot(syncer::ModelType model_type, | 78 static bool CreateRoot(ModelType model_type, UserShare* service); |
| 79 syncer::UserShare* service); | |
| 80 | 79 |
| 81 size_t GetDeleteJournalSize() const; | 80 size_t GetDeleteJournalSize() const; |
| 82 | 81 |
| 83 private: | 82 private: |
| 84 std::unique_ptr<TestDirectorySetterUpper> dir_maker_; | 83 std::unique_ptr<TestDirectorySetterUpper> dir_maker_; |
| 85 std::unique_ptr<UserShare> user_share_; | 84 std::unique_ptr<UserShare> user_share_; |
| 86 | 85 |
| 87 DISALLOW_COPY_AND_ASSIGN(TestUserShare); | 86 DISALLOW_COPY_AND_ASSIGN(TestUserShare); |
| 88 }; | 87 }; |
| 89 | 88 |
| 90 } // namespace syncer | 89 } // namespace syncer |
| 91 | 90 |
| 92 #endif // COMPONENTS_SYNC_CORE_TEST_TEST_USER_SHARE_H_ | 91 #endif // COMPONENTS_SYNC_CORE_TEST_TEST_USER_SHARE_H_ |
| OLD | NEW |