chromium/components/sync/model/data_type_store_with_in_memory_cache_unittest.cc

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/sync/model/data_type_store_with_in_memory_cache.h"

#include <memory>
#include <tuple>
#include <utility>

#include "base/run_loop.h"
#include "base/test/bind.h"
#include "base/test/gmock_callback_support.h"
#include "base/test/mock_callback.h"
#include "base/test/task_environment.h"
#include "components/sync/model/in_memory_metadata_change_list.h"
#include "components/sync/model/metadata_batch.h"
#include "components/sync/model/data_type_store.h"
#include "components/sync/protocol/security_event_specifics.pb.h"
#include "components/sync/test/mock_data_type_store.h"
#include "components/sync/test/data_type_store_test_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace syncer {
namespace {

RunOnceCallback;
StoreWithCache;

void WriteToStore(DataTypeStore& store,
                  const std::string& storage_key,
                  sync_pb::SecurityEventSpecifics entry,
                  sync_pb::EntityMetadata metadata) {}

std::tuple<std::optional<ModelError>,
           std::unique_ptr<StoreWithCache>,
           std::unique_ptr<MetadataBatch>>
CreateAndLoadStoreWithCache(OnceDataTypeStoreFactory store_factory) {}

class DataTypeStoreWithInMemoryCacheTest : public ::testing::Test {};

TEST_F(DataTypeStoreWithInMemoryCacheTest, LoadsEmptyStore) {}

TEST_F(DataTypeStoreWithInMemoryCacheTest, LoadsPopulatedStore) {}

TEST_F(DataTypeStoreWithInMemoryCacheTest, HandlesStoreCreationError) {}

TEST_F(DataTypeStoreWithInMemoryCacheTest, HandlesStoreLoadError) {}

}  // namespace
}  // namespace syncer