Commit 0c4d58f5 authored by Sven Zheng's avatar Sven Zheng Committed by Commit Bot

Adds reset accounts to more e2e tests

Reset the test account is a required step for e2e test.
With this change, we can have at least 21 e2e tests passing. Other tests
have failed because my account is blocked by server(429 too many requests).
Next steps will be:
1 Resolve the server issue.
2 Add passing tests to CI.

Bug: 992143
Change-Id: I848ded79bd6f722fda42ccbdda7ee5b12f7042be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1829469
Commit-Queue: Sven Zheng <svenzheng@chromium.org>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#701683}
parent f422bd31
......@@ -2168,11 +2168,13 @@ IN_PROC_BROWSER_TEST_P(TwoClientBookmarksSyncTestIncludingUssTests,
IN_PROC_BROWSER_TEST_P(TwoClientBookmarksSyncTestIncludingUssTests,
E2E_ONLY(SanitySetup)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
}
IN_PROC_BROWSER_TEST_P(TwoClientBookmarksSyncTestIncludingUssTests,
E2E_ONLY(OneClientAddsBookmark)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// All profiles should sync same bookmarks.
ASSERT_TRUE(BookmarksMatchChecker().Wait())
......@@ -2223,6 +2225,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientBookmarksSyncTestIncludingUssTests,
IN_PROC_BROWSER_TEST_P(TwoClientBookmarksSyncTestIncludingUssTests,
E2E_ONLY(TwoClientsAddBookmarks)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// ALl profiles should sync same bookmarks.
ASSERT_TRUE(BookmarksMatchChecker().Wait())
......@@ -2253,6 +2256,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientBookmarksSyncTestIncludingUssTests,
// synced to a second client once bookmark syncing is re-enabled.
IN_PROC_BROWSER_TEST_P(TwoClientBookmarksSyncTestIncludingUssTests,
E2E_ENABLED(AddBookmarkWhileDisabled)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
ASSERT_TRUE(BookmarksMatchChecker().Wait())
<< "Initial bookmark models did not match for all profiles";
......
......@@ -30,6 +30,7 @@ class TwoClientDictionarySyncTest : public SyncTest {
};
IN_PROC_BROWSER_TEST_F(TwoClientDictionarySyncTest, E2E_ENABLED(Sanity)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
dictionary_helper::LoadDictionaries();
ASSERT_TRUE(DictionaryMatchChecker().Wait());
......@@ -60,6 +61,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientDictionarySyncTest, E2E_ENABLED(Sanity)) {
IN_PROC_BROWSER_TEST_F(TwoClientDictionarySyncTest,
E2E_ENABLED(SimultaneousAdd)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
dictionary_helper::LoadDictionaries();
ASSERT_TRUE(DictionaryMatchChecker().Wait());
......@@ -72,6 +74,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientDictionarySyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientDictionarySyncTest,
E2E_ENABLED(SimultaneousRemove)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
dictionary_helper::LoadDictionaries();
ASSERT_TRUE(DictionaryMatchChecker().Wait());
......@@ -89,6 +92,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientDictionarySyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientDictionarySyncTest,
E2E_ENABLED(AddDifferentToEach)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
dictionary_helper::LoadDictionaries();
ASSERT_TRUE(DictionaryMatchChecker().Wait());
......@@ -103,6 +107,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientDictionarySyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientDictionarySyncTest,
E2E_ENABLED(RemoveOnAAddOnB)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
dictionary_helper::LoadDictionaries();
ASSERT_TRUE(DictionaryMatchChecker().Wait());
......
......@@ -68,12 +68,14 @@ class TwoClientExtensionAppsSyncTest : public SyncTest {
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
E2E_ENABLED(StartWithNoApps)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AppsMatchChecker().Wait());
}
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
E2E_ENABLED(StartWithSameApps)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupClients());
const int kNumApps = 5;
......@@ -124,6 +126,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest, StartWithDifferentApps) {
// end up with all apps, and the app and page ordinals should be identical.
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
E2E_ENABLED(InstallDifferentApps)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupClients());
int i = 0;
......@@ -150,6 +153,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
}
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest, E2E_ENABLED(Add)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AppsMatchChecker().Wait());
......@@ -159,6 +163,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest, E2E_ENABLED(Add)) {
}
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest, E2E_ENABLED(Uninstall)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AppsMatchChecker().Wait());
......@@ -175,6 +180,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest, E2E_ENABLED(Uninstall)) {
// ordinals.
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
E2E_ENABLED(UninstallThenInstall)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AppsMatchChecker().Wait());
......@@ -189,6 +195,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
}
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest, E2E_ENABLED(Merge)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AppsMatchChecker().Wait());
......@@ -208,6 +215,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest, E2E_ENABLED(Merge)) {
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
E2E_ENABLED(UpdateEnableDisableApp)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AppsMatchChecker().Wait());
......@@ -223,6 +231,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
E2E_ENABLED(UpdateIncognitoEnableDisable)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AppsMatchChecker().Wait());
......@@ -241,6 +250,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
// the app.
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
E2E_ENABLED(UpdatePageOrdinal)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AppsMatchChecker().Wait());
......@@ -259,6 +269,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
// launch ordinal for the app.
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
E2E_ENABLED(UpdateAppLaunchOrdinal)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AppsMatchChecker().Wait());
......@@ -278,6 +289,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
// page and app launch ordinal values for the CWS.
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
E2E_ENABLED(UpdateCWSOrdinals)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AppsMatchChecker().Wait());
......@@ -308,6 +320,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
// have the same launch type values for the CWS.
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
E2E_ENABLED(UpdateLaunchType)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync());
// Wait until sync settles before we override the apps below.
ASSERT_TRUE(AwaitQuiescence());
......
......@@ -33,6 +33,7 @@ class TwoClientExtensionsSyncTest : public SyncTest {
IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
E2E_ENABLED(StartWithNoExtensions)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(ExtensionsMatchChecker().Wait());
}
......@@ -52,6 +53,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
#endif
IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
E2E_ENABLED(MAYBE_StartWithSameExtensions)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupClients());
const int kNumExtensions = 5;
......@@ -74,6 +76,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
#endif
IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
MAYBE_E2E(MAYBE_StartWithDifferentExtensions)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupClients());
int extension_index = 0;
......@@ -103,6 +106,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
E2E_ENABLED(InstallDifferentExtensions)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupClients());
int extension_index = 0;
......@@ -143,6 +147,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest, MAYBE_E2E(Add)) {
}
IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest, MAYBE_E2E(Uninstall)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AllProfilesHaveSameExtensions());
......@@ -156,6 +161,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest, MAYBE_E2E(Uninstall)) {
IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
MAYBE_E2E(UpdateEnableDisableExtension)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AllProfilesHaveSameExtensions());
......@@ -175,6 +181,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
E2E_ENABLED(UpdateIncognitoEnableDisable)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AllProfilesHaveSameExtensions());
......@@ -196,6 +203,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
// setting up sync, when uninstalled, is also uninstalled from sync.
IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
E2E_ENABLED(UninstallPreinstalledExtensions)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupClients());
ASSERT_TRUE(AllProfilesHaveSameExtensions());
......
......@@ -52,6 +52,7 @@ class TwoClientPasswordsSyncTest : public FeatureToggler, public SyncTest {
};
IN_PROC_BROWSER_TEST_P(TwoClientPasswordsSyncTest, E2E_ENABLED(Add)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
ASSERT_TRUE(SamePasswordFormsChecker().Wait());
......@@ -64,6 +65,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientPasswordsSyncTest, E2E_ENABLED(Add)) {
}
IN_PROC_BROWSER_TEST_P(TwoClientPasswordsSyncTest, E2E_ENABLED(Race)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
ASSERT_TRUE(AllProfilesContainSamePasswordForms());
......@@ -123,6 +125,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientPasswordsSyncTest, MergeWithTheMostRecent) {
IN_PROC_BROWSER_TEST_P(TwoClientPasswordsSyncTest,
E2E_ENABLED(SetPassphraseAndAddPassword)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
GetSyncService(0)->GetUserSettings()->SetEncryptionPassphrase(
......@@ -243,6 +246,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientPasswordsSyncTest,
}
IN_PROC_BROWSER_TEST_P(TwoClientPasswordsSyncTest, E2E_ONLY(DeleteTwo)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
ASSERT_TRUE(AllProfilesContainSamePasswordForms());
......@@ -291,6 +295,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientPasswordsSyncTest, DeleteAll) {
}
IN_PROC_BROWSER_TEST_P(TwoClientPasswordsSyncTest, E2E_ENABLED(Merge)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
ASSERT_TRUE(AllProfilesContainSamePasswordForms());
......@@ -306,6 +311,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientPasswordsSyncTest, E2E_ENABLED(Merge)) {
}
IN_PROC_BROWSER_TEST_P(TwoClientPasswordsSyncTest, E2E_ONLY(TwoClientAddPass)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// All profiles should sync same passwords.
ASSERT_TRUE(SamePasswordFormsChecker().Wait())
......
......@@ -45,6 +45,7 @@ class TwoClientPreferencesSyncTest : public SyncTest {
};
IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, E2E_ENABLED(Sanity)) {
ResetSyncForPrimaryAccount();
DisableVerifier();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// Wait until sync settles before we override the prefs below.
......@@ -81,6 +82,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, E2E_ENABLED(Sanity)) {
}
IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, E2E_ENABLED(BooleanPref)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(BooleanPrefMatchChecker(prefs::kHomePageIsNewTabPage).Wait());
......@@ -90,6 +92,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, E2E_ENABLED(BooleanPref)) {
IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest,
E2E_ENABLED(Bidirectional)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(StringPrefMatchChecker(prefs::kHomePage).Wait());
......@@ -107,6 +110,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest,
E2E_ENABLED(UnsyncableBooleanPref)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync());
DisableVerifier();
ASSERT_TRUE(StringPrefMatchChecker(prefs::kHomePage).Wait());
......@@ -125,6 +129,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest,
}
IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, E2E_ENABLED(StringPref)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(StringPrefMatchChecker(prefs::kHomePage).Wait());
......@@ -133,6 +138,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, E2E_ENABLED(StringPref)) {
}
IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, E2E_ENABLED(ClearPref)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync());
ChangeStringPref(0, prefs::kHomePage, "http://news.google.com");
ASSERT_TRUE(StringPrefMatchChecker(prefs::kHomePage).Wait());
......@@ -144,6 +150,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, E2E_ENABLED(ClearPref)) {
IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest,
E2E_ENABLED(ComplexPrefs)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(IntegerPrefMatchChecker(prefs::kRestoreOnStartup).Wait());
ASSERT_TRUE(ListPrefMatchChecker(prefs::kURLsToRestoreOnStartup).Wait());
......@@ -162,6 +169,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest,
E2E_ENABLED(SingleClientEnabledEncryptionBothChanged)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(BooleanPrefMatchChecker(prefs::kHomePageIsNewTabPage).Wait());
ASSERT_TRUE(StringPrefMatchChecker(prefs::kHomePage).Wait());
......@@ -178,6 +186,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest,
IN_PROC_BROWSER_TEST_F(
TwoClientPreferencesSyncTest,
E2E_ENABLED(BothClientsEnabledEncryptionAndChangedMultipleTimes)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(BooleanPrefMatchChecker(prefs::kHomePageIsNewTabPage).Wait());
......@@ -216,6 +225,7 @@ class TwoClientPreferencesSyncTestWithSelfNotifications : public SyncTest {
// Tests that late registered prefs are kept in sync with other clients.
IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTestWithSelfNotifications,
E2E_ENABLED(LateRegisteredPrefsShouldSync)) {
ResetSyncForPrimaryAccount();
// client0 has the pref registered before sync and is modifying a pref before
// that pref got registered with client1 (but after client1 started syncing).
ASSERT_TRUE(SetupClients()) << "SetupClients() failed.";
......@@ -255,6 +265,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTestWithSelfNotifications,
IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTestWithSelfNotifications,
E2E_ENABLED(ShouldKeepLocalDataOnTypeMismatch)) {
ResetSyncForPrimaryAccount();
// Client 1 has type-conflicting data in it's pref file. Verify that incoming
// values from sync of other type do not modify the local state.
SetPreexistingPreferencesFileContents(
......@@ -291,6 +302,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTestWithSelfNotifications,
// kept separate.
IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTestWithSelfNotifications,
E2E_ENABLED(ShouldIsolatePriorityPreferences)) {
ResetSyncForPrimaryAccount();
// Register a pref as priority with client0 and regular synced with client1.
ASSERT_TRUE(SetupClients()) << "SetupClients() failed.";
constexpr char pref_name[] = "testing.my-test-preference";
......
......@@ -26,6 +26,7 @@ class TwoClientSearchEnginesSyncTest : public SyncTest {
};
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, E2E_ENABLED(Add)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// TODO(crbug.com/953711): Ideally we could immediately assert
// search_engines_helper::AllServicesMatch(), but that's not possible today
......@@ -43,6 +44,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, E2E_ENABLED(Add)) {
}
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, E2E_ENABLED(Delete)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// TODO(crbug.com/953711): Ideally we could immediately assert
// search_engines_helper::AllServicesMatch(), but that's not possible today
......@@ -66,6 +68,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, E2E_ENABLED(Delete)) {
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest,
E2E_ENABLED(AddMultiple)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// TODO(crbug.com/953711): Ideally we could immediately assert
// search_engines_helper::AllServicesMatch(), but that's not possible today
......@@ -101,6 +104,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, Duplicates) {
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest,
E2E_ENABLED(UpdateKeyword)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// TODO(crbug.com/953711): Ideally we could immediately assert
// search_engines_helper::AllServicesMatch(), but that's not possible today
......@@ -120,6 +124,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest,
}
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, E2E_ENABLED(UpdateUrl)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// TODO(crbug.com/953711): Ideally we could immediately assert
// search_engines_helper::AllServicesMatch(), but that's not possible today
......@@ -140,6 +145,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, E2E_ENABLED(UpdateUrl)) {
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest,
E2E_ENABLED(UpdateName)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// TODO(crbug.com/953711): Ideally we could immediately assert
// search_engines_helper::AllServicesMatch(), but that's not possible today
......@@ -228,6 +234,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, DisableSync) {
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest,
E2E_ENABLED(SyncDefault)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// TODO(crbug.com/953711): Ideally we could immediately assert
// search_engines_helper::AllServicesMatch(), but that's not possible today
......@@ -248,6 +255,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest,
// without putting the clients out of sync.
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest,
E2E_ENABLED(DeleteSyncedDefault)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// TODO(crbug.com/953711): Ideally we could immediately assert
// search_engines_helper::AllServicesMatch(), but that's not possible today
......
......@@ -67,6 +67,7 @@ static const char* kURLTemplate =
IN_PROC_BROWSER_TEST_F(TwoClientSessionsSyncTest,
E2E_ENABLED(SingleClientChanged)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// Open tab and access a url on client 0
......@@ -99,6 +100,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientSessionsSyncTest, SingleClientClosed) {
}
IN_PROC_BROWSER_TEST_F(TwoClientSessionsSyncTest, E2E_ENABLED(AllChanged)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// Open tabs on all clients and retain window information.
......
......@@ -37,6 +37,7 @@ class TwoClientThemesSyncTest : public SyncTest {
// instead verifies the custom theme is pending for install.
IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest,
E2E_ENABLED(DefaultThenSyncCustom)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync());
// Wait until sync settles before we override the theme below.
AwaitQuiescence();
......@@ -61,6 +62,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest,
// to the system theme.
IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest,
E2E_ENABLED(CustomThenSyncNative)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupClients());
SetCustomTheme(GetProfile(0));
......@@ -83,6 +85,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest,
// to the default theme.
IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest,
E2E_ENABLED(CustomThenSyncDefault)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupClients());
SetCustomTheme(GetProfile(0));
......@@ -105,6 +108,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest,
// Most other tests have significant coverage of model association. This test
// is intended to test steady-state scenarios.
IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, E2E_ENABLED(CycleOptions)) {
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// Wait until sync settles before we override the theme below.
AwaitQuiescence();
......
......@@ -85,6 +85,7 @@ class TwoClientTypedUrlsSyncTest : public SyncTest {
};
IN_PROC_BROWSER_TEST_F(TwoClientTypedUrlsSyncTest, E2E_ENABLED(Add)) {
ResetSyncForPrimaryAccount();
// Use a randomized URL to prevent test collisions.
const base::string16 kHistoryUrl = ASCIIToUTF16(base::StringPrintf(
"http://www.add-history.google.com/%s", base::GenerateGUID().c_str()));
......@@ -363,6 +364,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientTypedUrlsSyncTest, AddThenExpireVisitByVisit) {
}
IN_PROC_BROWSER_TEST_F(TwoClientTypedUrlsSyncTest, E2E_ENABLED(AddThenDelete)) {
ResetSyncForPrimaryAccount();
// Use a randomized URL to prevent test collisions.
const base::string16 kHistoryUrl = ASCIIToUTF16(base::StringPrintf(
"http://www.add-history.google.com/%s", base::GenerateGUID().c_str()));
......@@ -423,6 +425,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientTypedUrlsSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientTypedUrlsSyncTest,
E2E_ENABLED(DisableEnableSync)) {
ResetSyncForPrimaryAccount();
const base::string16 kUrl1(ASCIIToUTF16("http://history1.google.com/"));
const base::string16 kUrl2(ASCIIToUTF16("http://history2.google.com/"));
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
......@@ -614,6 +617,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientTypedUrlsSyncTest, UpdateToNonTypedURL) {
IN_PROC_BROWSER_TEST_F(TwoClientTypedUrlsSyncTest,
E2E_ENABLED(DontSyncUpdatedNonTypedURLs)) {
ResetSyncForPrimaryAccount();
// Checks if a non-typed URL that has been updated (modified) doesn't get
// synced. This is a regression test after fixing a bug where adding a
// non-typed URL was guarded against but later modifying it was not. Since
......@@ -652,10 +656,10 @@ IN_PROC_BROWSER_TEST_F(TwoClientTypedUrlsSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientTypedUrlsSyncTest,
E2E_ENABLED(SyncTypedRedirects)) {
ResetSyncForPrimaryAccount();
const base::string16 kHistoryUrl(ASCIIToUTF16("http://typed.google.com/"));
const base::string16 kRedirectedHistoryUrl(
ASCIIToUTF16("http://www.typed.google.com/"));
ResetSyncForPrimaryAccount();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// Simulate a typed address that gets redirected by the server to a different
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment