#include "components/sync/service/model_load_manager.h"
#include <memory>
#include "base/test/task_environment.h"
#include "components/sync/base/sync_stop_metadata_fate.h"
#include "components/sync/service/configure_context.h"
#include "components/sync/test/fake_data_type_controller.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
_;
namespace syncer {
namespace {
ConfigureContext BuildConfigureContext(SyncMode sync_mode = SyncMode::kFull) { … }
}
class MockModelLoadManagerDelegate : public ModelLoadManagerDelegate { … };
class SyncModelLoadManagerTest : public testing::Test { … };
TEST_F(SyncModelLoadManagerTest, SimpleModelStart) { … }
TEST_F(SyncModelLoadManagerTest, StopAfterFinish) { … }
TEST_F(SyncModelLoadManagerTest, ModelLoadFail) { … }
TEST_F(SyncModelLoadManagerTest, StopAfterConfiguration) { … }
TEST_F(SyncModelLoadManagerTest, OnAllDataTypesReadyForConfigure) { … }
TEST_F(SyncModelLoadManagerTest,
OnAllDataTypesReadyForConfigure_FailedLoadModels) { … }
TEST_F(SyncModelLoadManagerTest,
OnAllDataTypesReadyForConfigure_TypeFailedAfterLoadModels) { … }
TEST_F(SyncModelLoadManagerTest, StopClearMetadata) { … }
TEST_F(SyncModelLoadManagerTest, StopDataType) { … }
TEST_F(SyncModelLoadManagerTest, StopDataType_NotRunning) { … }
TEST_F(SyncModelLoadManagerTest, KeepsMetadataForPreferredDataType) { … }
TEST_F(SyncModelLoadManagerTest, ClearsMetadataForNotPreferredDataType) { … }
TEST_F(SyncModelLoadManagerTest,
SwitchFromFullSyncToTransportModeRestartsTypes) { … }
TEST_F(SyncModelLoadManagerTest,
SwitchFromTransportOnlyToFullSyncRestartsTypes) { … }
TEST_F(SyncModelLoadManagerTest, ShouldClearMetadataAfterStopped) { … }
TEST_F(SyncModelLoadManagerTest, ShouldClearMetadataIfNotRunning) { … }
TEST_F(SyncModelLoadManagerTest, ShouldNotClearMetadataIfFailed) { … }
TEST_F(SyncModelLoadManagerTest,
ShouldWaitForStoppingDesiredTypesBeforeLoading) { … }
TEST_F(SyncModelLoadManagerTest,
ShouldNotWaitForStoppingUndesiredTypesBeforeLoading) { … }
TEST_F(SyncModelLoadManagerTest, ShouldTimeoutIfNotAllTypesLoaded) { … }
TEST_F(SyncModelLoadManagerTest, ShouldNotTimeoutAfterStop) { … }
TEST_F(SyncModelLoadManagerTest, ShouldNotStartFailedTypesUponLoadModels) { … }
TEST_F(SyncModelLoadManagerTest,
ShouldHandleMultipleStopCallbacksForStoppingType) { … }
}