#include "components/sync/model/data_type_store_service_impl.h"
#include <memory>
#include <string>
#include <utility>
#include "base/run_loop.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "base/test/test_file_util.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/testing_pref_service.h"
#include "components/sync/base/data_type.h"
#include "components/sync/base/pref_names.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace syncer {
namespace {
Eq;
Le;
NotNull;
SizeIs;
std::unique_ptr<DataTypeStore> ExerciseStoreFactoryAndWait(
const RepeatingDataTypeStoreFactory& store_factory,
DataType data_type = DataType::PREFERENCES) { … }
void WriteDataAndWait(DataTypeStore* store,
const std::string& id,
const std::string& value) { … }
std::optional<std::string> ReadDataAndWait(DataTypeStore* store,
const std::string& id) { … }
class DataTypeStoreServiceImplTest : public testing::Test { … };
TEST_F(DataTypeStoreServiceImplTest, ShouldSupportFactoryOutlivingService) { … }
TEST_F(DataTypeStoreServiceImplTest, ShouldUseIsolatedStorageTypes) { … }
TEST_F(DataTypeStoreServiceImplTest,
ShouldTriggerReadingListMigrationIfPrefSet) { … }
}
}