persistent_pref_store_unittest.h 857 B

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