#include "components/sync/service/glue/sync_engine_impl.h"
#include <memory>
#include <string>
#include <utility>
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/location.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/run_loop.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "base/test/mock_callback.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "base/test/test_timeouts.h"
#include "base/time/time.h"
#include "components/prefs/testing_pref_service.h"
#include "components/sync/base/data_type.h"
#include "components/sync/base/features.h"
#include "components/sync/engine/cycle/sync_cycle_snapshot.h"
#include "components/sync/engine/net/http_bridge.h"
#include "components/sync/engine/sync_engine_host.h"
#include "components/sync/engine/sync_manager_factory.h"
#include "components/sync/protocol/sync_enums.pb.h"
#include "components/sync/protocol/sync_invalidations_payload.pb.h"
#include "components/sync/service/active_devices_provider.h"
#include "components/sync/service/glue/sync_transport_data_prefs.h"
#include "components/sync/test/fake_sync_manager.h"
#include "components/sync/test/mock_sync_invalidations_service.h"
#include "services/network/test/test_network_connection_tracker.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
_;
ByMove;
NiceMock;
Return;
Sequence;
namespace syncer {
namespace {
static const base::FilePath::CharType kTestSyncDir[] = …);
constexpr char kTestGaiaId[] = …;
constexpr char kTestCacheGuid[] = …;
constexpr char kTestBirthday[] = …;
class MockSyncEngineHost : public SyncEngineHost { … };
class FakeSyncManagerFactory : public SyncManagerFactory { … };
class MockActiveDevicesProvider : public ActiveDevicesProvider { … };
std::unique_ptr<HttpPostProviderFactory> CreateHttpBridgeFactory() { … }
class SyncEngineImplTest : public testing::Test { … };
TEST_F(SyncEngineImplTest, InitShutdownWithStopSync) { … }
TEST_F(SyncEngineImplTest, InitShutdownWithDisableSync) { … }
TEST_F(SyncEngineImplTest, FirstTimeSync) { … }
TEST_F(SyncEngineImplTest, Restart) { … }
TEST_F(SyncEngineImplTest, DisableTypes) { … }
TEST_F(SyncEngineImplTest, AddTypes) { … }
TEST_F(SyncEngineImplTest, AddDisableTypes) { … }
TEST_F(SyncEngineImplTest, NewlySupportedTypes) { … }
TEST_F(SyncEngineImplTest, DownloadControlTypes) { … }
TEST_F(SyncEngineImplTest, SilentlyFailToDownloadControlTypes) { … }
TEST_F(SyncEngineImplTest, ForwardLocalRefreshRequest) { … }
TEST_F(SyncEngineImplTest, DownloadControlTypesNewClient) { … }
TEST_F(SyncEngineImplTest, DownloadControlTypesRestart) { … }
TEST_F(SyncEngineImplTest, DisableThenPurgeType) { … }
TEST_F(SyncEngineImplTest, DataTypeConnectorValidDuringShutdown) { … }
TEST_F(SyncEngineImplTest, ShouldInvalidateDataTypesOnIncomingInvalidation) { … }
TEST_F(SyncEngineImplTest, ShouldInvalidateOnlyEnabledDataTypes) { … }
TEST_F(SyncEngineImplTest, ShouldStartHandlingInvalidations) { … }
TEST_F(SyncEngineImplTest, DoNotUseOldInvalidationsAtAll) { … }
TEST_F(SyncEngineImplTest, ShouldEnableInvalidationsWhenStartedHandling) { … }
TEST_F(SyncEngineImplTest, ShouldEnableInvalidationsOnTokenUpdate) { … }
TEST_F(SyncEngineImplTest, GenerateCacheGUID) { … }
TEST_F(SyncEngineImplTest, ShouldLoadSyncDataUponInitialization) { … }
TEST_F(SyncEngineImplTest, ShouldNotifyOnNewInvalidatedDataTypes) { … }
TEST_F(SyncEngineImplTest, ShouldReturnWhetherNextPollTimePassed) { … }
}
}