#include "base/callback_list.h"
#include "base/files/file_util.h"
#include "base/path_service.h"
#include "base/threading/thread_restrictions.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/test/integration/secondary_account_helper.h"
#include "chrome/browser/sync/test/integration/sync_service_impl_harness.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/common/chrome_paths.h"
#include "components/sync/base/data_type.h"
#include "components/sync/service/glue/sync_transport_data_prefs.h"
#include "components/sync/service/sync_service_impl.h"
#include "content/public/test/browser_test.h"
namespace {
#if !BUILDFLAG(IS_CHROMEOS_ASH)
base::FilePath GetTestFilePathForCacheGuid() { … }
#endif
class SingleClientSecondaryAccountSyncTest : public SyncTest { … };
#if !BUILDFLAG(IS_CHROMEOS_ASH)
IN_PROC_BROWSER_TEST_F(SingleClientSecondaryAccountSyncTest,
StartsSyncTransportOnSignin) { … }
#else
IN_PROC_BROWSER_TEST_F(SingleClientSecondaryAccountSyncTest,
DoesNotStartSyncTransportOnSignin) {
ASSERT_TRUE(SetupClients()) << "SetupClients() failed.";
secondary_account_helper::SignInUnconsentedAccount(
profile(), &test_url_loader_factory_, "[email protected]");
EXPECT_EQ(syncer::SyncService::TransportState::DISABLED,
GetSyncService(0)->GetTransportState());
}
#endif
#if !BUILDFLAG(IS_CHROMEOS_ASH)
IN_PROC_BROWSER_TEST_F(SingleClientSecondaryAccountSyncTest,
SwitchesFromTransportToFeature) { … }
#endif
#if !BUILDFLAG(IS_CHROMEOS_ASH)
IN_PROC_BROWSER_TEST_F(SingleClientSecondaryAccountSyncTest,
PRE_ReusesSameCacheGuid) { … }
IN_PROC_BROWSER_TEST_F(SingleClientSecondaryAccountSyncTest,
ReusesSameCacheGuid) { … }
#endif
}