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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(syncer::ModelType model_type, |
79 syncer::UserShare* service); | 79 syncer::UserShare* service); |
80 | 80 |
81 size_t GetDeleteJournalSize() const; | 81 size_t GetDeleteJournalSize() const; |
82 | 82 |
83 private: | 83 private: |
84 scoped_ptr<TestDirectorySetterUpper> dir_maker_; | 84 std::unique_ptr<TestDirectorySetterUpper> dir_maker_; |
85 scoped_ptr<UserShare> user_share_; | 85 std::unique_ptr<UserShare> user_share_; |
86 | 86 |
87 DISALLOW_COPY_AND_ASSIGN(TestUserShare); | 87 DISALLOW_COPY_AND_ASSIGN(TestUserShare); |
88 }; | 88 }; |
89 | 89 |
90 } // namespace syncer | 90 } // namespace syncer |
91 | 91 |
92 #endif // SYNC_INTERNAL_API_PUBLIC_TEST_TEST_USER_SHARE_H_ | 92 #endif // SYNC_INTERNAL_API_PUBLIC_TEST_TEST_USER_SHARE_H_ |
OLD | NEW |