// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_VALUE_STORE_VALUE_STORE_TEST_SUITE_H_ #define COMPONENTS_VALUE_STORE_VALUE_STORE_TEST_SUITE_H_ #include #include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/test/task_environment.h" #include "components/value_store/value_store.h" #include "testing/gtest/include/gtest/gtest.h" namespace value_store { // Parameter type for the value-parameterized tests. typedef ValueStore* (*ValueStoreTestParam)(const base::FilePath& file_path); // Test fixture for ValueStore tests. Tests are defined in // value_store_test_suite.cc with configurations for both cached // and non-cached leveldb storage, and cached no-op storage. class ValueStoreTestSuite : public testing::TestWithParam { public: ValueStoreTestSuite(); ~ValueStoreTestSuite() override; void SetUp() override; void TearDown() override; protected: std::unique_ptr storage_; private: base::ScopedTempDir temp_dir_; base::test::TaskEnvironment task_environment_; }; } // namespace value_store #endif // COMPONENTS_VALUE_STORE_VALUE_STORE_TEST_SUITE_H_