#include "base/memory/raw_ptr.h"
#include "base/test/bind.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/sync/test/integration/bookmarks_helper.h"
#include "chrome/browser/sync/test/integration/fake_server_match_status_checker.h"
#include "chrome/browser/sync/test/integration/preferences_helper.h"
#include "chrome/browser/sync/test/integration/sync_disabled_checker.h"
#include "chrome/browser/sync/test/integration/sync_engine_stopped_checker.h"
#include "chrome/browser/sync/test/integration/sync_service_impl_harness.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h"
#include "chrome/browser/sync/test/integration/user_events_helper.h"
#include "chrome/browser/sync/user_event_service_factory.h"
#include "chrome/common/pref_names.h"
#include "components/history/core/common/pref_names.h"
#include "components/prefs/pref_member.h"
#include "components/prefs/pref_service.h"
#include "components/sync/base/data_type.h"
#include "components/sync/base/features.h"
#include "components/sync/engine/sync_protocol_error.h"
#include "components/sync/model/data_type_controller_delegate.h"
#include "components/sync/model/type_entities_count.h"
#include "components/sync/protocol/user_event_specifics.pb.h"
#include "components/sync/service/sync_service_impl.h"
#include "components/sync_user_events/user_event_service.h"
#include "content/public/test/browser_test.h"
#include "google_apis/gaia/google_service_auth_error.h"
BookmarkNode;
AddFolder;
SetTitle;
SyncServiceImpl;
IsEmpty;
CreateTestEvent;
namespace {
constexpr int64_t kUserEventTimeUsec = …;
syncer::DataTypeSet GetThrottledDataTypes(
syncer::SyncServiceImpl* sync_service) { … }
size_t GetTypeNonTombstoneEntitiesCount(
syncer::DataTypeControllerDelegate* data_type_controller_delegate) { … }
class TypeDisabledChecker : public SingleClientStatusChangeChecker { … };
class UserEventCommitChecker : public SingleClientStatusChangeChecker { … };
class SyncErrorTest : public SyncTest { … };
class ActionableProtocolErrorChecker : public SingleClientStatusChangeChecker { … };
IN_PROC_BROWSER_TEST_F(SyncErrorTest, BirthdayErrorTest) { … }
IN_PROC_BROWSER_TEST_F(SyncErrorTest, UpgradeClientErrorDuringIncrementalSync) { … }
IN_PROC_BROWSER_TEST_F(SyncErrorTest, UpgradeClientErrorDuringInitialSync) { … }
#if BUILDFLAG(IS_CHROMEOS_ASH)
#define MAYBE_ErrorWhileSettingUp …
#else
#define MAYBE_ErrorWhileSettingUp …
#endif
IN_PROC_BROWSER_TEST_F(SyncErrorTest, MAYBE_ErrorWhileSettingUp) { … }
IN_PROC_BROWSER_TEST_F(SyncErrorTest, ClientDataObsoleteTest) { … }
IN_PROC_BROWSER_TEST_F(SyncErrorTest, EncryptionObsoleteErrorTest) { … }
IN_PROC_BROWSER_TEST_F(SyncErrorTest, DisableDatatypeWhileRunning) { … }
IN_PROC_BROWSER_TEST_F(SyncErrorTest,
PRE_ShouldResendUncommittedEntitiesAfterBrowserRestart) { … }
IN_PROC_BROWSER_TEST_F(SyncErrorTest,
ShouldResendUncommittedEntitiesAfterBrowserRestart) { … }
IN_PROC_BROWSER_TEST_F(SyncErrorTest, ShouldThrottleOneDatatypeButNotOthers) { … }
}