#include "base/containers/enum_set.h"
#include "base/files/file_util.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/mock_callback.h"
#include "base/test/scoped_feature_list.h"
#include "base/values.h"
#include "chrome/browser/reading_list/reading_list_model_factory.h"
#include "chrome/browser/sync/account_bookmark_sync_service_factory.h"
#include "chrome/browser/sync/local_or_syncable_bookmark_sync_service_factory.h"
#include "chrome/browser/sync/test/integration/bookmarks_helper.h"
#include "chrome/browser/sync/test/integration/committed_all_nudged_changes_checker.h"
#include "chrome/browser/sync/test/integration/passwords_helper.h"
#include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
#include "chrome/browser/sync/test/integration/sync_service_impl_harness.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "components/policy/core/browser/browser_policy_connector.h"
#include "components/policy/core/common/mock_configuration_policy_provider.h"
#include "components/policy/core/common/policy_map.h"
#include "components/policy/core/common/policy_types.h"
#include "components/policy/policy_constants.h"
#include "components/reading_list/core/dual_reading_list_model.h"
#include "components/reading_list/core/mock_reading_list_model_observer.h"
#include "components/signin/public/base/signin_pref_names.h"
#include "components/sync/base/data_type.h"
#include "components/sync/base/features.h"
#include "components/sync/base/time.h"
#include "components/sync/protocol/sync.pb.h"
#include "components/sync/protocol/sync_enums.pb.h"
#include "components/sync/service/glue/sync_transport_data_prefs.h"
#include "components/sync/test/fake_server.h"
#include "components/sync_bookmarks/bookmark_sync_service.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/test_launcher.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
FakeServer;
SyncEnums;
DataType;
DataTypeSet;
namespace {
class GetUpdatesObserver : public FakeServer::Observer { … };
class SingleClientCommonSyncTest : public SyncTest { … };
#if !BUILDFLAG(IS_ANDROID)
IN_PROC_BROWSER_TEST_F(SingleClientCommonSyncTest,
PRE_ShouldNotIssueGetUpdatesOnBrowserRestart) { … }
IN_PROC_BROWSER_TEST_F(SingleClientCommonSyncTest,
ShouldNotIssueGetUpdatesOnBrowserRestart) { … }
#endif
IN_PROC_BROWSER_TEST_F(SingleClientCommonSyncTest,
ShouldGetTypesWithUnsyncedDataFromSyncService) { … }
#if !BUILDFLAG(IS_CHROMEOS_ASH)
IN_PROC_BROWSER_TEST_F(SingleClientCommonSyncTest,
ReusesCacheGuidAfterSignoutAndSignin) { … }
IN_PROC_BROWSER_TEST_F(SingleClientCommonSyncTest,
ReusesCacheGuidOnlyForSameAccount) { … }
#endif
#if !BUILDFLAG(IS_ANDROID)
void WaitForReadingListModelLoaded(ReadingListModel* reading_list_model) { … }
std::unique_ptr<syncer::LoopbackServerEntity> CreateTestReadingListEntity(
const GURL& url,
const std::string& entry_title) { … }
class SingleClientFeatureToTransportSyncTest : public SyncTest { … };
IN_PROC_BROWSER_TEST_F(SingleClientFeatureToTransportSyncTest,
PRE_ShouldFixBadMetadata) { … }
IN_PROC_BROWSER_TEST_F(SingleClientFeatureToTransportSyncTest,
ShouldFixBadMetadata) { … }
#endif
class SingleClientPolicySyncTest : public SyncTest { … };
IN_PROC_BROWSER_TEST_F(SingleClientPolicySyncTest,
AppliesSyncTypesListDisabledPolicyImmediately) { … }
}