Sync + supervised user test makeover
This CL improves the existing Sync + supervised user test by utilizing
the same sync initialization flow as the real world scenario.
Previously, the ProfileSyncServiceHarness::SetupSync() was being used to
start sync. This is wrong for several reasons; most notably, it enabled
all datatypes as opposed to the limited set allowed for supervised
users.
Cool fact: if this test had been present earlier, it would have caught
crbug.com/417400 (albeit flakily in 1 of every 10 runs).
This CL also does the following:
1) Exposes two new methods on ProfileSyncServiceHarness that allow for
waiting on sync initialization and setup.
2) ProfileSyncServiceHarness::SetupSync() now DCHECKs when it is called
for a supervised user.
BUG=417400, 422508
Review URL: https://codereview.chromium.org/623843002
Cr-Commit-Position: refs/heads/master@{#299524}
diff --git a/chrome/browser/supervised_user/supervised_user_service.h b/chrome/browser/supervised_user/supervised_user_service.h
index fb3c065..69e9fc11 100644
--- a/chrome/browser/supervised_user/supervised_user_service.h
+++ b/chrome/browser/supervised_user/supervised_user_service.h
@@ -203,6 +203,7 @@
private:
friend class SupervisedUserServiceExtensionTestBase;
friend class SupervisedUserServiceFactory;
+ FRIEND_TEST_ALL_PREFIXES(SingleClientSupervisedUserSettingsSyncTest, Sanity);
FRIEND_TEST_ALL_PREFIXES(SupervisedUserServiceTest, ClearOmitOnRegistration);
FRIEND_TEST_ALL_PREFIXES(SupervisedUserServiceTest,
ChangesIncludedSessionOnChangedSettings);