#include "components/leveldb_proto/internal/shared_proto_database.h"
#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/task/sequenced_task_runner.h"
#include "base/test/task_environment.h"
#include "base/threading/thread.h"
#include "build/build_config.h"
#include "components/leveldb_proto/internal/proto_leveldb_wrapper.h"
#include "components/leveldb_proto/testing/proto/test_db.pb.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
_;
namespace leveldb_proto {
namespace {
inline void GetClientFromTaskRunner(SharedProtoDatabase* db,
ProtoDbType db_type,
base::OnceClosure closure) { … }
}
class MockSharedDb : public SharedProtoDatabase { … };
class SharedProtoDatabaseTest : public testing::Test { … };
TEST_F(SharedProtoDatabaseTest, CreateClient_SucceedsWithCreate) { … }
TEST_F(SharedProtoDatabaseTest, CreateClient_FailsWithoutCreate) { … }
TEST_F(SharedProtoDatabaseTest,
CreateClient_SucceedsWithoutCreateIfAlreadyCreated) { … }
TEST_F(SharedProtoDatabaseTest, GetClient_DifferentThreads) { … }
TEST_F(SharedProtoDatabaseTest, InitNotCreateDb) { … }
TEST_F(SharedProtoDatabaseTest, InitWithDifferentCreateIfMissing) { … }
TEST_F(SharedProtoDatabaseTest, TestDBDestructionAfterInit) { … }
TEST_F(SharedProtoDatabaseTest, CancelDeleteObsoleteClients) { … }
TEST_F(SharedProtoDatabaseTest, DeleteObsoleteClients) { … }
}