1 // Copyright 2017 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef COMPONENTS_PREFS_PERSISTENT_PREF_STORE_UNITTEST_H_ 6 #define COMPONENTS_PREFS_PERSISTENT_PREF_STORE_UNITTEST_H_ 7 8 namespace base { 9 namespace test { 10 class TaskEnvironment; 11 } 12 } // namespace base 13 14 class PersistentPrefStore; 15 16 // Calls CommitPendingWrite() on |store| with a callback. Verifies that the 17 // callback runs on the appropriate sequence. |task_environment| is the 18 // test's TaskEnvironment. This function is meant to be reused in the 19 // tests of various PersistentPrefStore implementations. 20 void TestCommitPendingWriteWithCallback( 21 PersistentPrefStore* store, 22 base::test::TaskEnvironment* task_environment); 23 24 #endif // COMPONENTS_PREFS_PERSISTENT_PREF_STORE_UNITTEST_H_ 25