Commit 0eff0570 authored by Mikel Astiz's avatar Mikel Astiz Committed by Commit Bot

Stop testing legacy codepath before pseudo-USS sync

We are about to remove the feature toggles, which have been enabled by
default for some time, so let's start removing test coverage in sync
integration tests.

Bug: 933874
Change-Id: I7e1265ff5f59deb514c09d3ce9f988db0706ab96
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1587598
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Auto-Submit: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: default avatarMohamed Amir Yosef <mamir@chromium.org>
Cr-Commit-Position: refs/heads/master@{#654832}
parent 9058e6e9
......@@ -4,11 +4,9 @@
#include "base/macros.h"
#include "chrome/browser/sync/test/integration/apps_helper.h"
#include "chrome/browser/sync/test/integration/feature_toggler.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h"
#include "components/sync/driver/profile_sync_service.h"
#include "components/sync/driver/sync_driver_switches.h"
namespace {
......@@ -16,10 +14,9 @@ using apps_helper::AllProfilesHaveSameApps;
using apps_helper::InstallApp;
using apps_helper::InstallPlatformApp;
class SingleClientAppsSyncTest : public FeatureToggler, public SyncTest {
class SingleClientAppsSyncTest : public SyncTest {
public:
SingleClientAppsSyncTest()
: FeatureToggler(switches::kSyncPseudoUSSApps), SyncTest(SINGLE_CLIENT) {}
SingleClientAppsSyncTest() : SyncTest(SINGLE_CLIENT) {}
~SingleClientAppsSyncTest() override {}
......@@ -27,12 +24,12 @@ class SingleClientAppsSyncTest : public FeatureToggler, public SyncTest {
DISALLOW_COPY_AND_ASSIGN(SingleClientAppsSyncTest);
};
IN_PROC_BROWSER_TEST_P(SingleClientAppsSyncTest, StartWithNoApps) {
IN_PROC_BROWSER_TEST_F(SingleClientAppsSyncTest, StartWithNoApps) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AllProfilesHaveSameApps());
}
IN_PROC_BROWSER_TEST_P(SingleClientAppsSyncTest, StartWithSomeLegacyApps) {
IN_PROC_BROWSER_TEST_F(SingleClientAppsSyncTest, StartWithSomeLegacyApps) {
ASSERT_TRUE(SetupClients());
const int kNumApps = 5;
......@@ -45,7 +42,7 @@ IN_PROC_BROWSER_TEST_P(SingleClientAppsSyncTest, StartWithSomeLegacyApps) {
ASSERT_TRUE(AllProfilesHaveSameApps());
}
IN_PROC_BROWSER_TEST_P(SingleClientAppsSyncTest, StartWithSomePlatformApps) {
IN_PROC_BROWSER_TEST_F(SingleClientAppsSyncTest, StartWithSomePlatformApps) {
ASSERT_TRUE(SetupClients());
const int kNumApps = 5;
......@@ -58,7 +55,7 @@ IN_PROC_BROWSER_TEST_P(SingleClientAppsSyncTest, StartWithSomePlatformApps) {
ASSERT_TRUE(AllProfilesHaveSameApps());
}
IN_PROC_BROWSER_TEST_P(SingleClientAppsSyncTest, InstallSomeLegacyApps) {
IN_PROC_BROWSER_TEST_F(SingleClientAppsSyncTest, InstallSomeLegacyApps) {
ASSERT_TRUE(SetupSync());
const int kNumApps = 5;
......@@ -71,7 +68,7 @@ IN_PROC_BROWSER_TEST_P(SingleClientAppsSyncTest, InstallSomeLegacyApps) {
ASSERT_TRUE(AllProfilesHaveSameApps());
}
IN_PROC_BROWSER_TEST_P(SingleClientAppsSyncTest, InstallSomePlatformApps) {
IN_PROC_BROWSER_TEST_F(SingleClientAppsSyncTest, InstallSomePlatformApps) {
ASSERT_TRUE(SetupSync());
const int kNumApps = 5;
......@@ -84,7 +81,7 @@ IN_PROC_BROWSER_TEST_P(SingleClientAppsSyncTest, InstallSomePlatformApps) {
ASSERT_TRUE(AllProfilesHaveSameApps());
}
IN_PROC_BROWSER_TEST_P(SingleClientAppsSyncTest, InstallSomeApps) {
IN_PROC_BROWSER_TEST_F(SingleClientAppsSyncTest, InstallSomeApps) {
ASSERT_TRUE(SetupSync());
int i = 0;
......@@ -105,8 +102,4 @@ IN_PROC_BROWSER_TEST_P(SingleClientAppsSyncTest, InstallSomeApps) {
ASSERT_TRUE(AllProfilesHaveSameApps());
}
INSTANTIATE_TEST_SUITE_P(USS,
SingleClientAppsSyncTest,
::testing::Values(false, true));
} // namespace
......@@ -3,12 +3,10 @@
// found in the LICENSE file.
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/test/integration/feature_toggler.h"
#include "chrome/browser/sync/test/integration/sync_arc_package_helper.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h"
#include "chrome/browser/ui/app_list/arc/arc_package_syncable_service.h"
#include "components/sync/driver/sync_driver_switches.h"
namespace arc {
......@@ -21,11 +19,9 @@ bool AllProfilesHaveSameArcPackageDetails() {
} // namespace
class SingleClientArcPackageSyncTest : public FeatureToggler, public SyncTest {
class SingleClientArcPackageSyncTest : public SyncTest {
public:
SingleClientArcPackageSyncTest()
: FeatureToggler(switches::kSyncPseudoUSSArcPackage),
SyncTest(SINGLE_CLIENT) {}
SingleClientArcPackageSyncTest() : SyncTest(SINGLE_CLIENT) {}
~SingleClientArcPackageSyncTest() override {}
......@@ -33,13 +29,13 @@ class SingleClientArcPackageSyncTest : public FeatureToggler, public SyncTest {
DISALLOW_COPY_AND_ASSIGN(SingleClientArcPackageSyncTest);
};
IN_PROC_BROWSER_TEST_P(SingleClientArcPackageSyncTest, ArcPackageEmpty) {
IN_PROC_BROWSER_TEST_F(SingleClientArcPackageSyncTest, ArcPackageEmpty) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AllProfilesHaveSameArcPackageDetails());
}
IN_PROC_BROWSER_TEST_P(SingleClientArcPackageSyncTest,
IN_PROC_BROWSER_TEST_F(SingleClientArcPackageSyncTest,
ArcPackageInstallSomePackages) {
ASSERT_TRUE(SetupSync());
......@@ -53,8 +49,4 @@ IN_PROC_BROWSER_TEST_P(SingleClientArcPackageSyncTest,
ASSERT_TRUE(AllProfilesHaveSameArcPackageDetails());
}
INSTANTIATE_TEST_SUITE_P(USS,
SingleClientArcPackageSyncTest,
::testing::Values(false, true));
} // namespace arc
......@@ -4,26 +4,23 @@
#include "base/macros.h"
#include "chrome/browser/sync/test/integration/dictionary_helper.h"
#include "chrome/browser/sync/test/integration/feature_toggler.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h"
#include "components/sync/driver/profile_sync_service.h"
#include "components/sync/driver/sync_driver_switches.h"
namespace {
class SingleClientDictionarySyncTest : public FeatureToggler, public SyncTest {
class SingleClientDictionarySyncTest : public SyncTest {
public:
SingleClientDictionarySyncTest()
: FeatureToggler(switches::kSyncPseudoUSSDictionary),
SyncTest(SINGLE_CLIENT) {}
SingleClientDictionarySyncTest() : SyncTest(SINGLE_CLIENT) {}
~SingleClientDictionarySyncTest() override {}
private:
DISALLOW_COPY_AND_ASSIGN(SingleClientDictionarySyncTest);
};
IN_PROC_BROWSER_TEST_P(SingleClientDictionarySyncTest, Sanity) {
IN_PROC_BROWSER_TEST_F(SingleClientDictionarySyncTest, Sanity) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
dictionary_helper::LoadDictionaries();
ASSERT_TRUE(dictionary_helper::DictionariesMatch());
......@@ -38,8 +35,4 @@ IN_PROC_BROWSER_TEST_P(SingleClientDictionarySyncTest, Sanity) {
ASSERT_TRUE(dictionary_helper::DictionariesMatch());
}
INSTANTIATE_TEST_SUITE_P(USS,
SingleClientDictionarySyncTest,
::testing::Values(false, true));
} // namespace
......@@ -6,11 +6,9 @@
#include "base/macros.h"
#include "chrome/browser/sync/test/integration/await_match_status_change_checker.h"
#include "chrome/browser/sync/test/integration/extensions_helper.h"
#include "chrome/browser/sync/test/integration/feature_toggler.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h"
#include "components/sync/driver/profile_sync_service.h"
#include "components/sync/driver/sync_driver_switches.h"
#include "components/sync/test/fake_server/fake_server.h"
namespace {
......@@ -21,11 +19,9 @@ using extensions_helper::GetInstalledExtensions;
using extensions_helper::InstallExtension;
using extensions_helper::InstallExtensionForAllProfiles;
class SingleClientExtensionsSyncTest : public FeatureToggler, public SyncTest {
class SingleClientExtensionsSyncTest : public SyncTest {
public:
SingleClientExtensionsSyncTest()
: FeatureToggler(switches::kSyncPseudoUSSExtensions),
SyncTest(SINGLE_CLIENT) {}
SingleClientExtensionsSyncTest() : SyncTest(SINGLE_CLIENT) {}
~SingleClientExtensionsSyncTest() override {}
......@@ -33,12 +29,12 @@ class SingleClientExtensionsSyncTest : public FeatureToggler, public SyncTest {
DISALLOW_COPY_AND_ASSIGN(SingleClientExtensionsSyncTest);
};
IN_PROC_BROWSER_TEST_P(SingleClientExtensionsSyncTest, StartWithNoExtensions) {
IN_PROC_BROWSER_TEST_F(SingleClientExtensionsSyncTest, StartWithNoExtensions) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AllProfilesHaveSameExtensionsAsVerifier());
}
IN_PROC_BROWSER_TEST_P(SingleClientExtensionsSyncTest,
IN_PROC_BROWSER_TEST_F(SingleClientExtensionsSyncTest,
StartWithSomeExtensions) {
ASSERT_TRUE(SetupClients());
......@@ -52,7 +48,7 @@ IN_PROC_BROWSER_TEST_P(SingleClientExtensionsSyncTest,
ASSERT_TRUE(AllProfilesHaveSameExtensionsAsVerifier());
}
IN_PROC_BROWSER_TEST_P(SingleClientExtensionsSyncTest, InstallSomeExtensions) {
IN_PROC_BROWSER_TEST_F(SingleClientExtensionsSyncTest, InstallSomeExtensions) {
ASSERT_TRUE(SetupSync());
const int kNumExtensions = 5;
......@@ -73,7 +69,7 @@ static bool ExtensionCountCheck(Profile* profile, size_t expected_count) {
// Tests the case of an uninstall from the server conflicting with a local
// modification, which we expect to be resolved in favor of the uninstall.
IN_PROC_BROWSER_TEST_P(SingleClientExtensionsSyncTest, UninstallWinsConflicts) {
IN_PROC_BROWSER_TEST_F(SingleClientExtensionsSyncTest, UninstallWinsConflicts) {
ASSERT_TRUE(SetupClients());
// Start with an extension installed, and setup sync.
......@@ -110,8 +106,4 @@ IN_PROC_BROWSER_TEST_P(SingleClientExtensionsSyncTest, UninstallWinsConflicts) {
EXPECT_TRUE(GetInstalledExtensions(GetProfile(0)).empty());
}
INSTANTIATE_TEST_SUITE_P(USS,
SingleClientExtensionsSyncTest,
::testing::Values(false, true));
} // namespace
......@@ -10,13 +10,11 @@
#include "base/test/bind_test_util.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/history/web_history_service_factory.h"
#include "chrome/browser/sync/test/integration/feature_toggler.h"
#include "chrome/browser/sync/test/integration/single_client_status_change_checker.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h"
#include "components/history/core/browser/history_service.h"
#include "components/history/core/browser/history_types.h"
#include "components/sync/driver/sync_driver_switches.h"
#include "components/sync/engine_impl/loopback_server/persistent_unique_client_entity.h"
#include "components/sync/protocol/sync.pb.h"
#include "components/sync/test/fake_server/fake_server.h"
......@@ -69,12 +67,10 @@ class HistoryDeleteDirectivesEqualityChecker
DISALLOW_COPY_AND_ASSIGN(HistoryDeleteDirectivesEqualityChecker);
};
class SingleClientHistoryDeleteDirectivesSyncTest : public FeatureToggler,
public SyncTest {
class SingleClientHistoryDeleteDirectivesSyncTest : public SyncTest {
public:
SingleClientHistoryDeleteDirectivesSyncTest()
: FeatureToggler(switches::kSyncPseudoUSSHistoryDeleteDirectives),
SyncTest(SINGLE_CLIENT) {}
SingleClientHistoryDeleteDirectivesSyncTest() : SyncTest(SINGLE_CLIENT) {}
~SingleClientHistoryDeleteDirectivesSyncTest() override {}
bool WaitForHistoryDeleteDirectives(size_t num_expected_directives) {
......@@ -109,7 +105,7 @@ class SingleClientHistoryDeleteDirectivesSyncTest : public FeatureToggler,
DISALLOW_COPY_AND_ASSIGN(SingleClientHistoryDeleteDirectivesSyncTest);
};
IN_PROC_BROWSER_TEST_P(SingleClientHistoryDeleteDirectivesSyncTest,
IN_PROC_BROWSER_TEST_F(SingleClientHistoryDeleteDirectivesSyncTest,
ShouldCommitTimeRangeDeleteDirective) {
const GURL kPageUrl = GURL("http://foo.com");
const base::Time kHistoryEntryTime = base::Time::Now();
......@@ -130,7 +126,7 @@ IN_PROC_BROWSER_TEST_P(SingleClientHistoryDeleteDirectivesSyncTest,
EXPECT_TRUE(WaitForHistoryDeleteDirectives(1));
}
IN_PROC_BROWSER_TEST_P(SingleClientHistoryDeleteDirectivesSyncTest,
IN_PROC_BROWSER_TEST_F(SingleClientHistoryDeleteDirectivesSyncTest,
ShouldCommitUrlDeleteDirective) {
const GURL kPageUrl = GURL("http://foo.com");
const base::Time kHistoryEntryTime = base::Time::Now();
......@@ -147,7 +143,7 @@ IN_PROC_BROWSER_TEST_P(SingleClientHistoryDeleteDirectivesSyncTest,
EXPECT_TRUE(WaitForHistoryDeleteDirectives(1));
}
IN_PROC_BROWSER_TEST_P(SingleClientHistoryDeleteDirectivesSyncTest,
IN_PROC_BROWSER_TEST_F(SingleClientHistoryDeleteDirectivesSyncTest,
ShouldProcessDeleteDirectiveDuringStartup) {
const GURL kPageUrl = GURL("http://foo.com");
const base::Time kHistoryEntryTime = base::Time::Now();
......@@ -190,8 +186,4 @@ IN_PROC_BROWSER_TEST_P(SingleClientHistoryDeleteDirectivesSyncTest,
EXPECT_TRUE(WaitForHistoryDeleteDirectives(1));
}
INSTANTIATE_TEST_SUITE_P(USS,
SingleClientHistoryDeleteDirectivesSyncTest,
::testing::Values(false, true));
} // namespace
......@@ -7,7 +7,6 @@
#include "base/test/metrics/histogram_tester.h"
#include "base/values.h"
#include "build/build_config.h"
#include "chrome/browser/sync/test/integration/feature_toggler.h"
#include "chrome/browser/sync/test/integration/preferences_helper.h"
#include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
......@@ -17,7 +16,6 @@
#include "components/prefs/json_pref_store.h"
#include "components/prefs/pref_service.h"
#include "components/sync/driver/profile_sync_service.h"
#include "components/sync/driver/sync_driver_switches.h"
#include "testing/gmock/include/gmock/gmock.h"
using preferences_helper::BooleanPrefMatches;
......@@ -30,18 +28,17 @@ using testing::NotNull;
namespace {
class SingleClientPreferencesSyncTest : public FeatureToggler, public SyncTest {
class SingleClientPreferencesSyncTest : public SyncTest {
public:
SingleClientPreferencesSyncTest()
: FeatureToggler(switches::kSyncPseudoUSSPreferences),
SyncTest(SINGLE_CLIENT) {}
SingleClientPreferencesSyncTest() : SyncTest(SINGLE_CLIENT) {}
~SingleClientPreferencesSyncTest() override {}
private:
DISALLOW_COPY_AND_ASSIGN(SingleClientPreferencesSyncTest);
};
IN_PROC_BROWSER_TEST_P(SingleClientPreferencesSyncTest, Sanity) {
IN_PROC_BROWSER_TEST_F(SingleClientPreferencesSyncTest, Sanity) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
ASSERT_TRUE(BooleanPrefMatches(prefs::kHomePageIsNewTabPage));
ChangeBooleanPref(0, prefs::kHomePageIsNewTabPage);
......@@ -51,7 +48,7 @@ IN_PROC_BROWSER_TEST_P(SingleClientPreferencesSyncTest, Sanity) {
// This test simply verifies that preferences registered after sync started
// get properly synced.
IN_PROC_BROWSER_TEST_P(SingleClientPreferencesSyncTest, LateRegistration) {
IN_PROC_BROWSER_TEST_F(SingleClientPreferencesSyncTest, LateRegistration) {
ASSERT_TRUE(SetupClients()) << "SetupClients() failed.";
PrefRegistrySyncable* registry = GetRegistry(GetProfile(0));
const std::string pref_name = "testing.my-test-preference";
......@@ -80,7 +77,7 @@ IN_PROC_BROWSER_TEST_P(SingleClientPreferencesSyncTest, LateRegistration) {
#define MAYBE_ShouldRemoveBadDataWhenRegistering \
ShouldRemoveBadDataWhenRegistering
#endif
IN_PROC_BROWSER_TEST_P(SingleClientPreferencesSyncTest,
IN_PROC_BROWSER_TEST_F(SingleClientPreferencesSyncTest,
MAYBE_ShouldRemoveBadDataWhenRegistering) {
// Populate the data store with data of type boolean but register as string.
SetPreexistingPreferencesFileContents(
......@@ -109,7 +106,7 @@ IN_PROC_BROWSER_TEST_P(SingleClientPreferencesSyncTest,
// Regression test to verify that pagination during GetUpdates() contributes
// properly to UMA histograms.
IN_PROC_BROWSER_TEST_P(SingleClientPreferencesSyncTest,
IN_PROC_BROWSER_TEST_F(SingleClientPreferencesSyncTest,
EmitModelTypeEntityChangeToUma) {
const int kNumEntities = 17;
......@@ -132,7 +129,7 @@ IN_PROC_BROWSER_TEST_P(SingleClientPreferencesSyncTest,
/*REMOTE_INITIAL_UPDATE=*/5));
}
IN_PROC_BROWSER_TEST_P(SingleClientPreferencesSyncTest,
IN_PROC_BROWSER_TEST_F(SingleClientPreferencesSyncTest,
PRE_PersistProgressMarkerOnRestart) {
sync_pb::EntitySpecifics specifics;
specifics.mutable_preference()->set_name("testing.my-test-preference");
......@@ -150,7 +147,7 @@ IN_PROC_BROWSER_TEST_P(SingleClientPreferencesSyncTest,
/*REMOTE_INITIAL_UPDATE=*/5));
}
IN_PROC_BROWSER_TEST_P(SingleClientPreferencesSyncTest,
IN_PROC_BROWSER_TEST_F(SingleClientPreferencesSyncTest,
PersistProgressMarkerOnRestart) {
sync_pb::EntitySpecifics specifics;
specifics.mutable_preference()->set_name("testing.my-test-preference");
......@@ -180,8 +177,4 @@ IN_PROC_BROWSER_TEST_P(SingleClientPreferencesSyncTest,
/*REMOTE_INITIAL_UPDATE=*/5));
}
INSTANTIATE_TEST_SUITE_P(USS,
SingleClientPreferencesSyncTest,
::testing::Values(false, true));
} // namespace
......@@ -3,34 +3,26 @@
// found in the LICENSE file.
#include "base/macros.h"
#include "chrome/browser/sync/test/integration/feature_toggler.h"
#include "chrome/browser/sync/test/integration/search_engines_helper.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h"
#include "components/search_engines/template_url_service.h"
#include "components/sync/driver/profile_sync_service.h"
#include "components/sync/driver/sync_driver_switches.h"
class SingleClientSearchEnginesSyncTest : public FeatureToggler,
public SyncTest {
class SingleClientSearchEnginesSyncTest : public SyncTest {
public:
SingleClientSearchEnginesSyncTest()
: FeatureToggler(switches::kSyncPseudoUSSSearchEngines),
SyncTest(SINGLE_CLIENT) {}
SingleClientSearchEnginesSyncTest() : SyncTest(SINGLE_CLIENT) {}
~SingleClientSearchEnginesSyncTest() override {}
private:
DISALLOW_COPY_AND_ASSIGN(SingleClientSearchEnginesSyncTest);
};
IN_PROC_BROWSER_TEST_P(SingleClientSearchEnginesSyncTest, Sanity) {
IN_PROC_BROWSER_TEST_F(SingleClientSearchEnginesSyncTest, Sanity) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
ASSERT_TRUE(search_engines_helper::ServiceMatchesVerifier(0));
search_engines_helper::AddSearchEngine(0, 0);
ASSERT_TRUE(UpdatedProgressMarkerChecker(GetSyncService(0)).Wait());
ASSERT_TRUE(search_engines_helper::ServiceMatchesVerifier(0));
}
INSTANTIATE_TEST_SUITE_P(USS,
SingleClientSearchEnginesSyncTest,
::testing::Values(false, true));
......@@ -5,14 +5,12 @@
#include "base/macros.h"
#include "build/build_config.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/sync/test/integration/feature_toggler.h"
#include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/sync/test/integration/themes_helper.h"
#include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h"
#include "chrome/browser/themes/theme_service_factory.h"
#include "components/sync/driver/profile_sync_service.h"
#include "components/sync/driver/sync_driver_switches.h"
#include "content/public/test/test_utils.h"
using themes_helper::GetCustomTheme;
......@@ -25,11 +23,10 @@ using themes_helper::UsingSystemTheme;
namespace {
class SingleClientThemesSyncTest : public FeatureToggler, public SyncTest {
class SingleClientThemesSyncTest : public SyncTest {
public:
SingleClientThemesSyncTest()
: FeatureToggler(switches::kSyncPseudoUSSThemes),
SyncTest(SINGLE_CLIENT) {}
SingleClientThemesSyncTest() : SyncTest(SINGLE_CLIENT) {}
~SingleClientThemesSyncTest() override {}
private:
......@@ -40,7 +37,7 @@ class SingleClientThemesSyncTest : public FeatureToggler, public SyncTest {
// start with SetupClients(), change the theme state, then call
// SetupSync()).
IN_PROC_BROWSER_TEST_P(SingleClientThemesSyncTest, CustomTheme) {
IN_PROC_BROWSER_TEST_F(SingleClientThemesSyncTest, CustomTheme) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
EXPECT_FALSE(UsingCustomTheme(GetProfile(0)));
......@@ -59,9 +56,9 @@ IN_PROC_BROWSER_TEST_P(SingleClientThemesSyncTest, CustomTheme) {
// TODO(sync): Fails on Chrome OS. See http://crbug.com/84575.
#if defined(OS_CHROMEOS)
IN_PROC_BROWSER_TEST_P(SingleClientThemesSyncTest, DISABLED_NativeTheme) {
IN_PROC_BROWSER_TEST_F(SingleClientThemesSyncTest, DISABLED_NativeTheme) {
#else
IN_PROC_BROWSER_TEST_P(SingleClientThemesSyncTest, NativeTheme) {
IN_PROC_BROWSER_TEST_F(SingleClientThemesSyncTest, NativeTheme) {
#endif // OS_CHROMEOS
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
......@@ -83,7 +80,7 @@ IN_PROC_BROWSER_TEST_P(SingleClientThemesSyncTest, NativeTheme) {
EXPECT_TRUE(UsingSystemTheme(verifier()));
}
IN_PROC_BROWSER_TEST_P(SingleClientThemesSyncTest, DefaultTheme) {
IN_PROC_BROWSER_TEST_F(SingleClientThemesSyncTest, DefaultTheme) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
SetCustomTheme(GetProfile(0));
......@@ -104,8 +101,4 @@ IN_PROC_BROWSER_TEST_P(SingleClientThemesSyncTest, DefaultTheme) {
EXPECT_TRUE(UsingDefaultTheme(verifier()));
}
INSTANTIATE_TEST_SUITE_P(USS,
SingleClientThemesSyncTest,
::testing::Values(false, true));
} // namespace
......@@ -15,7 +15,6 @@
#include "chrome/browser/extensions/launch_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/test/integration/apps_helper.h"
#include "chrome/browser/sync/test/integration/feature_toggler.h"
#include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
#include "chrome/browser/sync/test/integration/sync_app_helper.h"
#include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
......@@ -26,7 +25,6 @@
#include "chrome/common/extensions/manifest_handlers/app_launch_info.h"
#include "chrome/common/extensions/manifest_handlers/app_theme_color_info.h"
#include "chrome/common/web_application_info.h"
#include "components/sync/driver/sync_driver_switches.h"
#include "components/sync/model/string_ordinal.h"
#include "content/public/browser/notification_service.h"
#include "content/public/test/test_utils.h"
......@@ -58,12 +56,9 @@ extensions::ExtensionRegistry* GetExtensionRegistry(Profile* profile) {
} // namespace
class TwoClientAppsSyncTest : public FeatureToggler, public SyncTest {
class TwoClientAppsSyncTest : public SyncTest {
public:
TwoClientAppsSyncTest()
: FeatureToggler(switches::kSyncPseudoUSSApps), SyncTest(TWO_CLIENT) {
DisableVerifier();
}
TwoClientAppsSyncTest() : SyncTest(TWO_CLIENT) { DisableVerifier(); }
~TwoClientAppsSyncTest() override {}
......@@ -74,12 +69,12 @@ class TwoClientAppsSyncTest : public FeatureToggler, public SyncTest {
DISALLOW_COPY_AND_ASSIGN(TwoClientAppsSyncTest);
};
IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, E2E_ENABLED(StartWithNoApps)) {
IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, E2E_ENABLED(StartWithNoApps)) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AppsMatchChecker().Wait());
}
IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, E2E_ENABLED(StartWithSameApps)) {
IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, E2E_ENABLED(StartWithSameApps)) {
ASSERT_TRUE(SetupClients());
const int kNumApps = 5;
......@@ -95,7 +90,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, E2E_ENABLED(StartWithSameApps)) {
// Install some apps on both clients, some on only one client, some on only the
// other, and sync. Both clients should end up with all apps, and the app and
// page ordinals should be identical.
IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, StartWithDifferentApps) {
IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, StartWithDifferentApps) {
ASSERT_TRUE(SetupClients());
int i = 0;
......@@ -128,7 +123,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, StartWithDifferentApps) {
// Install some apps on both clients, then sync. Then install some apps on only
// one client, some on only the other, and then sync again. Both clients should
// end up with all apps, and the app and page ordinals should be identical.
IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest,
E2E_ENABLED(InstallDifferentApps)) {
ASSERT_TRUE(SetupClients());
......@@ -155,7 +150,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest,
ASSERT_TRUE(AppsMatchChecker().Wait());
}
IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, E2E_ENABLED(Add)) {
IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, E2E_ENABLED(Add)) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AppsMatchChecker().Wait());
......@@ -164,7 +159,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, E2E_ENABLED(Add)) {
ASSERT_TRUE(AppsMatchChecker().Wait());
}
IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, E2E_ENABLED(Uninstall)) {
IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, E2E_ENABLED(Uninstall)) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AppsMatchChecker().Wait());
......@@ -179,7 +174,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, E2E_ENABLED(Uninstall)) {
// client and sync again. Now install a new app on the first client and sync.
// Both client should only have the second app, with identical app and page
// ordinals.
IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest,
E2E_ENABLED(UninstallThenInstall)) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AppsMatchChecker().Wait());
......@@ -194,7 +189,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest,
ASSERT_TRUE(AppsMatchChecker().Wait());
}
IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, E2E_ENABLED(Merge)) {
IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, E2E_ENABLED(Merge)) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AppsMatchChecker().Wait());
......@@ -212,7 +207,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, E2E_ENABLED(Merge)) {
ASSERT_TRUE(AppsMatchChecker().Wait());
}
IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest,
E2E_ENABLED(UpdateEnableDisableApp)) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AppsMatchChecker().Wait());
......@@ -227,7 +222,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest,
ASSERT_TRUE(AppsMatchChecker().Wait());
}
IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest,
E2E_ENABLED(UpdateIncognitoEnableDisable)) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AppsMatchChecker().Wait());
......@@ -245,7 +240,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest,
// Install the same app on both clients, then sync. Change the page ordinal on
// one client and sync. Both clients should have the updated page ordinal for
// the app.
IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, E2E_ENABLED(UpdatePageOrdinal)) {
IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, E2E_ENABLED(UpdatePageOrdinal)) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AppsMatchChecker().Wait());
......@@ -262,7 +257,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, E2E_ENABLED(UpdatePageOrdinal)) {
// Install the same app on both clients, then sync. Change the app launch
// ordinal on one client and sync. Both clients should have the updated app
// launch ordinal for the app.
IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest,
E2E_ENABLED(UpdateAppLaunchOrdinal)) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AppsMatchChecker().Wait());
......@@ -281,7 +276,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest,
// Adjust the CWS location within a page on the first client and sync. Adjust
// which page the CWS appears on and sync. Both clients should have the same
// page and app launch ordinal values for the CWS.
IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, E2E_ENABLED(UpdateCWSOrdinals)) {
IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, E2E_ENABLED(UpdateCWSOrdinals)) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AppsMatchChecker().Wait());
......@@ -310,7 +305,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, E2E_ENABLED(UpdateCWSOrdinals)) {
// Adjust the launch type on the first client and sync. Both clients should
// have the same launch type values for the CWS.
IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, E2E_ENABLED(UpdateLaunchType)) {
IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, E2E_ENABLED(UpdateLaunchType)) {
ASSERT_TRUE(SetupSync());
// Wait until sync settles before we override the apps below.
ASSERT_TRUE(AwaitQuiescence());
......@@ -338,7 +333,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, E2E_ENABLED(UpdateLaunchType)) {
extensions::LAUNCH_TYPE_REGULAR);
}
IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, UnexpectedLaunchType) {
IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, UnexpectedLaunchType) {
ASSERT_TRUE(SetupSync());
// Wait until sync settles before we override the apps below.
ASSERT_TRUE(AwaitQuiescence());
......@@ -379,7 +374,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, UnexpectedLaunchType) {
ASSERT_TRUE(AppsMatchChecker().Wait());
}
IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, BookmarkAppBasic) {
IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, BookmarkAppBasic) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AllProfilesHaveSameApps());
......@@ -416,7 +411,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, BookmarkAppBasic) {
}
}
IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, BookmarkAppMinimal) {
IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, BookmarkAppMinimal) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AllProfilesHaveSameApps());
......@@ -462,7 +457,7 @@ const extensions::Extension* GetAppByLaunchURL(const GURL& url,
return nullptr;
}
IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, BookmarkAppThemeColor) {
IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, BookmarkAppThemeColor) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AllProfilesHaveSameApps());
......@@ -503,7 +498,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, BookmarkAppThemeColor) {
EXPECT_EQ(SK_ColorBLUE, theme_color.value());
}
IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, IsLocallyInstalled) {
IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, IsLocallyInstalled) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AllProfilesHaveSameApps());
......@@ -560,7 +555,3 @@ IN_PROC_BROWSER_TEST_P(TwoClientAppsSyncTest, IsLocallyInstalled) {
// TODO(akalin): Add tests exercising:
// - Offline installation/uninstallation behavior
// - App-specific properties
INSTANTIATE_TEST_SUITE_P(USS,
TwoClientAppsSyncTest,
::testing::Values(false, true));
......@@ -3,11 +3,9 @@
// found in the LICENSE file.
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/test/integration/feature_toggler.h"
#include "chrome/browser/sync/test/integration/sync_arc_package_helper.h"
#include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "components/sync/driver/sync_driver_switches.h"
namespace arc {
......@@ -20,13 +18,9 @@ bool AllProfilesHaveSameArcPackageDetails() {
} // namespace
class TwoClientArcPackageSyncTest : public FeatureToggler, public SyncTest {
class TwoClientArcPackageSyncTest : public SyncTest {
public:
TwoClientArcPackageSyncTest()
: FeatureToggler(switches::kSyncPseudoUSSArcPackage),
SyncTest(TWO_CLIENT) {
DisableVerifier();
}
TwoClientArcPackageSyncTest() : SyncTest(TWO_CLIENT) { DisableVerifier(); }
~TwoClientArcPackageSyncTest() override {}
......@@ -34,13 +28,13 @@ class TwoClientArcPackageSyncTest : public FeatureToggler, public SyncTest {
DISALLOW_COPY_AND_ASSIGN(TwoClientArcPackageSyncTest);
};
IN_PROC_BROWSER_TEST_P(TwoClientArcPackageSyncTest, StartWithNoPackages) {
IN_PROC_BROWSER_TEST_F(TwoClientArcPackageSyncTest, StartWithNoPackages) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AllProfilesHaveSameArcPackageDetails());
}
IN_PROC_BROWSER_TEST_P(TwoClientArcPackageSyncTest, StartWithSamePackages) {
IN_PROC_BROWSER_TEST_F(TwoClientArcPackageSyncTest, StartWithSamePackages) {
ASSERT_TRUE(SetupClients());
constexpr size_t kNumPackages = 5;
......@@ -56,7 +50,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientArcPackageSyncTest, StartWithSamePackages) {
// In this test, packages are installed before sync started. Client1 will have
// package 0 to 4 installed while client2 has no package installed.
IN_PROC_BROWSER_TEST_P(TwoClientArcPackageSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientArcPackageSyncTest,
OneClientHasPackagesAnotherHasNone) {
ASSERT_TRUE(SetupClients());
......@@ -74,7 +68,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientArcPackageSyncTest,
// In this test, packages are installed before sync started. Client1 will have
// package 0 to 9 installed and client2 will have package 0 to 4 installed.
IN_PROC_BROWSER_TEST_P(TwoClientArcPackageSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientArcPackageSyncTest,
OneClientHasPackagesAnotherHasSubSet) {
ASSERT_TRUE(SetupClients());
......@@ -97,7 +91,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientArcPackageSyncTest,
// In this test, packages are installed before sync started. Client1 will have
// package 0 to 4 installed and client2 will have package 1 to 5 installed.
IN_PROC_BROWSER_TEST_P(TwoClientArcPackageSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientArcPackageSyncTest,
StartWithDifferentPackages) {
ASSERT_TRUE(SetupClients());
......@@ -117,7 +111,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientArcPackageSyncTest,
}
// Tests package installaton after sync started.
IN_PROC_BROWSER_TEST_P(TwoClientArcPackageSyncTest, Install) {
IN_PROC_BROWSER_TEST_F(TwoClientArcPackageSyncTest, Install) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AllProfilesHaveSameArcPackageDetails());
......@@ -128,7 +122,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientArcPackageSyncTest, Install) {
// In this test, packages are installed after sync started. Client1 installs
// package 0 to 4 and client2 installs package 3 to 7.
IN_PROC_BROWSER_TEST_P(TwoClientArcPackageSyncTest, InstallDifferent) {
IN_PROC_BROWSER_TEST_F(TwoClientArcPackageSyncTest, InstallDifferent) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AllProfilesHaveSameArcPackageDetails());
......@@ -146,7 +140,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientArcPackageSyncTest, InstallDifferent) {
// Installs package from one client and uninstalls from another after sync
// started.
IN_PROC_BROWSER_TEST_P(TwoClientArcPackageSyncTest, Uninstall) {
IN_PROC_BROWSER_TEST_F(TwoClientArcPackageSyncTest, Uninstall) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AllProfilesHaveSameArcPackageDetails());
......@@ -160,8 +154,4 @@ IN_PROC_BROWSER_TEST_P(TwoClientArcPackageSyncTest, Uninstall) {
EXPECT_TRUE(AllProfilesHaveSameArcPackageDetails());
}
INSTANTIATE_TEST_SUITE_P(USS,
TwoClientArcPackageSyncTest,
::testing::Values(false, true));
} // namespace arc
......@@ -6,24 +6,21 @@
#include "base/strings/string_number_conversions.h"
#include "build/build_config.h"
#include "chrome/browser/sync/test/integration/dictionary_helper.h"
#include "chrome/browser/sync/test/integration/feature_toggler.h"
#include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
#include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h"
#include "components/spellcheck/common/spellcheck_common.h"
#include "components/sync/base/model_type.h"
#include "components/sync/driver/sync_driver_switches.h"
namespace {
using spellcheck::kMaxSyncableDictionaryWords;
class TwoClientDictionarySyncTest : public FeatureToggler, public SyncTest {
class TwoClientDictionarySyncTest : public SyncTest {
public:
TwoClientDictionarySyncTest()
: FeatureToggler(switches::kSyncPseudoUSSDictionary),
SyncTest(TWO_CLIENT) {}
TwoClientDictionarySyncTest() : SyncTest(TWO_CLIENT) {}
~TwoClientDictionarySyncTest() override {}
bool TestUsesSelfNotifications() override { return false; }
......@@ -32,7 +29,7 @@ class TwoClientDictionarySyncTest : public FeatureToggler, public SyncTest {
DISALLOW_COPY_AND_ASSIGN(TwoClientDictionarySyncTest);
};
IN_PROC_BROWSER_TEST_P(TwoClientDictionarySyncTest, E2E_ENABLED(Sanity)) {
IN_PROC_BROWSER_TEST_F(TwoClientDictionarySyncTest, E2E_ENABLED(Sanity)) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
dictionary_helper::LoadDictionaries();
ASSERT_TRUE(DictionaryMatchChecker().Wait());
......@@ -61,7 +58,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientDictionarySyncTest, E2E_ENABLED(Sanity)) {
ASSERT_EQ(words.size(), dictionary_helper::GetDictionarySize(0));
}
IN_PROC_BROWSER_TEST_P(TwoClientDictionarySyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientDictionarySyncTest,
E2E_ENABLED(SimultaneousAdd)) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
dictionary_helper::LoadDictionaries();
......@@ -73,7 +70,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientDictionarySyncTest,
ASSERT_EQ(1UL, dictionary_helper::GetDictionarySize(0));
}
IN_PROC_BROWSER_TEST_P(TwoClientDictionarySyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientDictionarySyncTest,
E2E_ENABLED(SimultaneousRemove)) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
dictionary_helper::LoadDictionaries();
......@@ -90,7 +87,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientDictionarySyncTest,
ASSERT_EQ(0UL, dictionary_helper::GetDictionarySize(0));
}
IN_PROC_BROWSER_TEST_P(TwoClientDictionarySyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientDictionarySyncTest,
E2E_ENABLED(AddDifferentToEach)) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
dictionary_helper::LoadDictionaries();
......@@ -104,7 +101,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientDictionarySyncTest,
static_cast<int>(dictionary_helper::GetDictionarySize(0)));
}
IN_PROC_BROWSER_TEST_P(TwoClientDictionarySyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientDictionarySyncTest,
E2E_ENABLED(RemoveOnAAddOnB)) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
dictionary_helper::LoadDictionaries();
......@@ -125,7 +122,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientDictionarySyncTest,
// Tests the case where a client has more words added than the
// kMaxSyncableDictionaryWords limit.
IN_PROC_BROWSER_TEST_P(TwoClientDictionarySyncTest, Limit) {
IN_PROC_BROWSER_TEST_F(TwoClientDictionarySyncTest, Limit) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
dictionary_helper::LoadDictionaries();
ASSERT_TRUE(DictionaryMatchChecker().Wait());
......@@ -170,8 +167,4 @@ IN_PROC_BROWSER_TEST_P(TwoClientDictionarySyncTest, Limit) {
NumDictionaryEntriesChecker(0, kMaxSyncableDictionaryWords).Wait());
}
INSTANTIATE_TEST_SUITE_P(USS,
TwoClientDictionarySyncTest,
::testing::Values(false, true));
} // namespace
......@@ -8,11 +8,9 @@
#include "chrome/browser/sync/test/integration/apps_helper.h"
#include "chrome/browser/sync/test/integration/extension_settings_helper.h"
#include "chrome/browser/sync/test/integration/extensions_helper.h"
#include "chrome/browser/sync/test/integration/feature_toggler.h"
#include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
#include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "components/sync/driver/sync_driver_switches.h"
namespace {
......@@ -60,12 +58,10 @@ void MutateSomeSettings(
}
}
class TwoClientExtensionSettingsAndAppSettingsSyncTest : public FeatureToggler,
public SyncTest {
class TwoClientExtensionSettingsAndAppSettingsSyncTest : public SyncTest {
public:
TwoClientExtensionSettingsAndAppSettingsSyncTest()
: FeatureToggler(switches::kSyncPseudoUSSExtensionSettings),
SyncTest(TWO_CLIENT) {}
TwoClientExtensionSettingsAndAppSettingsSyncTest() : SyncTest(TWO_CLIENT) {}
~TwoClientExtensionSettingsAndAppSettingsSyncTest() override {}
private:
......@@ -184,7 +180,7 @@ testing::AssertionResult StartWithDifferentSettingsTest(
return testing::AssertionSuccess();
}
IN_PROC_BROWSER_TEST_P(TwoClientExtensionSettingsAndAppSettingsSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientExtensionSettingsAndAppSettingsSyncTest,
ExtensionsStartWithSameSettings) {
ASSERT_TRUE(SetupClients());
ASSERT_PRED3(StartWithSameSettingsTest, InstallExtensionForAllProfiles(0),
......@@ -192,14 +188,14 @@ IN_PROC_BROWSER_TEST_P(TwoClientExtensionSettingsAndAppSettingsSyncTest,
InstallExtensionForAllProfiles(2));
}
IN_PROC_BROWSER_TEST_P(TwoClientExtensionSettingsAndAppSettingsSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientExtensionSettingsAndAppSettingsSyncTest,
AppsStartWithSameSettings) {
ASSERT_TRUE(SetupClients());
ASSERT_PRED3(StartWithSameSettingsTest, InstallAppForAllProfiles(0),
InstallAppForAllProfiles(1), InstallAppForAllProfiles(2));
}
IN_PROC_BROWSER_TEST_P(TwoClientExtensionSettingsAndAppSettingsSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientExtensionSettingsAndAppSettingsSyncTest,
ExtensionsStartWithDifferentSettings) {
ASSERT_TRUE(SetupClients());
ASSERT_PRED3(
......@@ -207,15 +203,11 @@ IN_PROC_BROWSER_TEST_P(TwoClientExtensionSettingsAndAppSettingsSyncTest,
InstallExtensionForAllProfiles(1), InstallExtensionForAllProfiles(2));
}
IN_PROC_BROWSER_TEST_P(TwoClientExtensionSettingsAndAppSettingsSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientExtensionSettingsAndAppSettingsSyncTest,
AppsStartWithDifferentSettings) {
ASSERT_TRUE(SetupClients());
ASSERT_PRED3(StartWithDifferentSettingsTest, InstallAppForAllProfiles(0),
InstallAppForAllProfiles(1), InstallAppForAllProfiles(2));
}
INSTANTIATE_TEST_SUITE_P(USS,
TwoClientExtensionSettingsAndAppSettingsSyncTest,
::testing::Values(false, true));
} // namespace
......@@ -5,11 +5,9 @@
#include "base/macros.h"
#include "build/build_config.h"
#include "chrome/browser/sync/test/integration/extensions_helper.h"
#include "chrome/browser/sync/test/integration/feature_toggler.h"
#include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
#include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "components/sync/driver/sync_driver_switches.h"
namespace {
......@@ -23,13 +21,9 @@ using extensions_helper::IncognitoEnableExtension;
using extensions_helper::InstallExtension;
using extensions_helper::UninstallExtension;
class TwoClientExtensionsSyncTest : public FeatureToggler, public SyncTest {
class TwoClientExtensionsSyncTest : public SyncTest {
public:
TwoClientExtensionsSyncTest()
: FeatureToggler(switches::kSyncPseudoUSSExtensions),
SyncTest(TWO_CLIENT) {
DisableVerifier();
}
TwoClientExtensionsSyncTest() : SyncTest(TWO_CLIENT) { DisableVerifier(); }
bool TestUsesSelfNotifications() override { return false; }
......@@ -37,7 +31,7 @@ class TwoClientExtensionsSyncTest : public FeatureToggler, public SyncTest {
DISALLOW_COPY_AND_ASSIGN(TwoClientExtensionsSyncTest);
};
IN_PROC_BROWSER_TEST_P(TwoClientExtensionsSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
E2E_ENABLED(StartWithNoExtensions)) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(ExtensionsMatchChecker().Wait());
......@@ -56,7 +50,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientExtensionsSyncTest,
#else
#define MAYBE_StartWithSameExtensions StartWithSameExtensions
#endif
IN_PROC_BROWSER_TEST_P(TwoClientExtensionsSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
E2E_ENABLED(MAYBE_StartWithSameExtensions)) {
ASSERT_TRUE(SetupClients());
......@@ -78,7 +72,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientExtensionsSyncTest,
#else
#define MAYBE_StartWithDifferentExtensions StartWithDifferentExtensions
#endif
IN_PROC_BROWSER_TEST_P(TwoClientExtensionsSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
MAYBE_E2E(MAYBE_StartWithDifferentExtensions)) {
ASSERT_TRUE(SetupClients());
......@@ -107,7 +101,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientExtensionsSyncTest,
static_cast<int>(GetInstalledExtensions(GetProfile(0)).size()));
}
IN_PROC_BROWSER_TEST_P(TwoClientExtensionsSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
E2E_ENABLED(InstallDifferentExtensions)) {
ASSERT_TRUE(SetupClients());
......@@ -138,7 +132,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientExtensionsSyncTest,
static_cast<int>(GetInstalledExtensions(GetProfile(0)).size()));
}
IN_PROC_BROWSER_TEST_P(TwoClientExtensionsSyncTest, MAYBE_E2E(Add)) {
IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest, MAYBE_E2E(Add)) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AllProfilesHaveSameExtensions());
......@@ -148,7 +142,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientExtensionsSyncTest, MAYBE_E2E(Add)) {
EXPECT_EQ(1u, GetInstalledExtensions(GetProfile(0)).size());
}
IN_PROC_BROWSER_TEST_P(TwoClientExtensionsSyncTest, MAYBE_E2E(Uninstall)) {
IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest, MAYBE_E2E(Uninstall)) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AllProfilesHaveSameExtensions());
......@@ -160,7 +154,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientExtensionsSyncTest, MAYBE_E2E(Uninstall)) {
EXPECT_TRUE(GetInstalledExtensions(GetProfile(0)).empty());
}
IN_PROC_BROWSER_TEST_P(TwoClientExtensionsSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
MAYBE_E2E(UpdateEnableDisableExtension)) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AllProfilesHaveSameExtensions());
......@@ -179,7 +173,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientExtensionsSyncTest,
ASSERT_TRUE(ExtensionsMatchChecker().Wait());
}
IN_PROC_BROWSER_TEST_P(TwoClientExtensionsSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
E2E_ENABLED(UpdateIncognitoEnableDisable)) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(AllProfilesHaveSameExtensions());
......@@ -200,7 +194,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientExtensionsSyncTest,
// Regression test for bug 104399: ensure that an extension installed prior to
// setting up sync, when uninstalled, is also uninstalled from sync.
IN_PROC_BROWSER_TEST_P(TwoClientExtensionsSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientExtensionsSyncTest,
E2E_ENABLED(UninstallPreinstalledExtensions)) {
ASSERT_TRUE(SetupClients());
ASSERT_TRUE(AllProfilesHaveSameExtensions());
......@@ -221,8 +215,4 @@ IN_PROC_BROWSER_TEST_P(TwoClientExtensionsSyncTest,
// TODO(akalin): Add tests exercising:
// - Offline installation/uninstallation behavior
INSTANTIATE_TEST_SUITE_P(USS,
TwoClientExtensionsSyncTest,
::testing::Values(false, true));
} // namespace
......@@ -8,7 +8,6 @@
#include "base/macros.h"
#include "base/strings/stringprintf.h"
#include "base/test/metrics/histogram_tester.h"
#include "chrome/browser/sync/test/integration/feature_toggler.h"
#include "chrome/browser/sync/test/integration/preferences_helper.h"
#include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
#include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
......@@ -16,7 +15,6 @@
#include "chrome/common/pref_names.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/pref_service.h"
#include "components/sync/driver/sync_driver_switches.h"
#include "testing/gmock/include/gmock/gmock.h"
using preferences_helper::BooleanPrefMatches;
......@@ -33,11 +31,10 @@ using user_prefs::PrefRegistrySyncable;
namespace {
class TwoClientPreferencesSyncTest : public FeatureToggler, public SyncTest {
class TwoClientPreferencesSyncTest : public SyncTest {
public:
TwoClientPreferencesSyncTest()
: FeatureToggler(switches::kSyncPseudoUSSPreferences),
SyncTest(TWO_CLIENT) {}
TwoClientPreferencesSyncTest() : SyncTest(TWO_CLIENT) {}
~TwoClientPreferencesSyncTest() override {}
// Needed for AwaitQuiescence().
......@@ -47,7 +44,7 @@ class TwoClientPreferencesSyncTest : public FeatureToggler, public SyncTest {
DISALLOW_COPY_AND_ASSIGN(TwoClientPreferencesSyncTest);
};
IN_PROC_BROWSER_TEST_P(TwoClientPreferencesSyncTest, E2E_ENABLED(Sanity)) {
IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, E2E_ENABLED(Sanity)) {
DisableVerifier();
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// Wait until sync settles before we override the prefs below.
......@@ -72,22 +69,18 @@ IN_PROC_BROWSER_TEST_P(TwoClientPreferencesSyncTest, E2E_ENABLED(Sanity)) {
"Sync.ModelTypeEntityChange3.PREFERENCE",
/*REMOTE_NON_INITIAL_UPDATE=*/4));
// Metrics below are instrumented for the USS codepath only.
if (GetParam()) {
EXPECT_EQ(
1U,
histogram_tester
.GetAllSamples(
"Sync.NonReflectionUpdateFreshnessPossiblySkewed.PREFERENCE")
.size());
EXPECT_NE(0U, histogram_tester
.GetAllSamples(
"Sync.NonReflectionUpdateFreshnessPossiblySkewed")
.size());
}
EXPECT_EQ(
1U, histogram_tester
.GetAllSamples(
"Sync.NonReflectionUpdateFreshnessPossiblySkewed.PREFERENCE")
.size());
EXPECT_NE(
0U, histogram_tester
.GetAllSamples("Sync.NonReflectionUpdateFreshnessPossiblySkewed")
.size());
}
IN_PROC_BROWSER_TEST_P(TwoClientPreferencesSyncTest, E2E_ENABLED(BooleanPref)) {
IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, E2E_ENABLED(BooleanPref)) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(BooleanPrefMatchChecker(prefs::kHomePageIsNewTabPage).Wait());
......@@ -95,7 +88,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientPreferencesSyncTest, E2E_ENABLED(BooleanPref)) {
ASSERT_TRUE(BooleanPrefMatchChecker(prefs::kHomePageIsNewTabPage).Wait());
}
IN_PROC_BROWSER_TEST_P(TwoClientPreferencesSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest,
E2E_ENABLED(Bidirectional)) {
ASSERT_TRUE(SetupSync());
......@@ -112,7 +105,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientPreferencesSyncTest,
GetPrefs(0)->GetString(prefs::kHomePage));
}
IN_PROC_BROWSER_TEST_P(TwoClientPreferencesSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest,
E2E_ENABLED(UnsyncableBooleanPref)) {
ASSERT_TRUE(SetupSync());
DisableVerifier();
......@@ -131,7 +124,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientPreferencesSyncTest,
ASSERT_FALSE(BooleanPrefMatches(prefs::kDisableScreenshots));
}
IN_PROC_BROWSER_TEST_P(TwoClientPreferencesSyncTest, E2E_ENABLED(StringPref)) {
IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, E2E_ENABLED(StringPref)) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(StringPrefMatchChecker(prefs::kHomePage).Wait());
......@@ -139,7 +132,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientPreferencesSyncTest, E2E_ENABLED(StringPref)) {
ASSERT_TRUE(StringPrefMatchChecker(prefs::kHomePage).Wait());
}
IN_PROC_BROWSER_TEST_P(TwoClientPreferencesSyncTest, E2E_ENABLED(ClearPref)) {
IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, E2E_ENABLED(ClearPref)) {
ASSERT_TRUE(SetupSync());
ChangeStringPref(0, prefs::kHomePage, "http://news.google.com");
ASSERT_TRUE(StringPrefMatchChecker(prefs::kHomePage).Wait());
......@@ -149,7 +142,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientPreferencesSyncTest, E2E_ENABLED(ClearPref)) {
ASSERT_TRUE(ClearedPrefMatchChecker(prefs::kHomePage).Wait());
}
IN_PROC_BROWSER_TEST_P(TwoClientPreferencesSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest,
E2E_ENABLED(ComplexPrefs)) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(IntegerPrefMatchChecker(prefs::kRestoreOnStartup).Wait());
......@@ -167,7 +160,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientPreferencesSyncTest,
ASSERT_TRUE(ListPrefMatchChecker(prefs::kURLsToRestoreOnStartup).Wait());
}
IN_PROC_BROWSER_TEST_P(TwoClientPreferencesSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest,
E2E_ENABLED(SingleClientEnabledEncryptionBothChanged)) {
ASSERT_TRUE(SetupSync());
ASSERT_TRUE(BooleanPrefMatchChecker(prefs::kHomePageIsNewTabPage).Wait());
......@@ -182,7 +175,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientPreferencesSyncTest,
ASSERT_TRUE(BooleanPrefMatchChecker(prefs::kHomePageIsNewTabPage).Wait());
}
IN_PROC_BROWSER_TEST_P(
IN_PROC_BROWSER_TEST_F(
TwoClientPreferencesSyncTest,
E2E_ENABLED(BothClientsEnabledEncryptionAndChangedMultipleTimes)) {
ASSERT_TRUE(SetupSync());
......@@ -200,12 +193,10 @@ IN_PROC_BROWSER_TEST_P(
// The following tests use lower-level mechanisms to wait for sync cycle
// completions. Those only work reliably with self notifications turned on.
class TwoClientPreferencesSyncTestWithSelfNotifications : public FeatureToggler,
public SyncTest {
class TwoClientPreferencesSyncTestWithSelfNotifications : public SyncTest {
public:
TwoClientPreferencesSyncTestWithSelfNotifications()
: FeatureToggler(switches::kSyncPseudoUSSPreferences),
SyncTest(TWO_CLIENT) {}
TwoClientPreferencesSyncTestWithSelfNotifications() : SyncTest(TWO_CLIENT) {}
~TwoClientPreferencesSyncTestWithSelfNotifications() override {}
void SetUp() override {
......@@ -223,7 +214,7 @@ class TwoClientPreferencesSyncTestWithSelfNotifications : public FeatureToggler,
};
// Tests that late registered prefs are kept in sync with other clients.
IN_PROC_BROWSER_TEST_P(TwoClientPreferencesSyncTestWithSelfNotifications,
IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTestWithSelfNotifications,
E2E_ENABLED(LateRegisteredPrefsShouldSync)) {
// client0 has the pref registered before sync and is modifying a pref before
// that pref got registered with client1 (but after client1 started syncing).
......@@ -262,7 +253,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientPreferencesSyncTestWithSelfNotifications,
EXPECT_THAT(GetPrefs(0)->GetBoolean(pref_name), Eq(true));
}
IN_PROC_BROWSER_TEST_P(TwoClientPreferencesSyncTestWithSelfNotifications,
IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTestWithSelfNotifications,
E2E_ENABLED(ShouldKeepLocalDataOnTypeMismatch)) {
// 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.
......@@ -298,7 +289,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientPreferencesSyncTestWithSelfNotifications,
// Verifies that priority synced preferences and regular sycned preferences are
// kept separate.
IN_PROC_BROWSER_TEST_P(TwoClientPreferencesSyncTestWithSelfNotifications,
IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTestWithSelfNotifications,
E2E_ENABLED(ShouldIsolatePriorityPreferences)) {
// Register a pref as priority with client0 and regular synced with client1.
ASSERT_TRUE(SetupClients()) << "SetupClients() failed.";
......@@ -323,12 +314,4 @@ IN_PROC_BROWSER_TEST_P(TwoClientPreferencesSyncTestWithSelfNotifications,
EXPECT_THAT(GetPrefs(1)->GetString(pref_name), Eq("non-priority value"));
}
INSTANTIATE_TEST_SUITE_P(USS,
TwoClientPreferencesSyncTest,
::testing::Values(false, true));
INSTANTIATE_TEST_SUITE_P(USS,
TwoClientPreferencesSyncTestWithSelfNotifications,
::testing::Values(false, true));
} // namespace
......@@ -5,7 +5,6 @@
#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/sync/test/integration/feature_toggler.h"
#include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
#include "chrome/browser/sync/test/integration/search_engines_helper.h"
#include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
......@@ -13,22 +12,20 @@
#include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h"
#include "components/search_engines/template_url.h"
#include "components/search_engines/template_url_service.h"
#include "components/sync/driver/sync_driver_switches.h"
using base::ASCIIToUTF16;
class TwoClientSearchEnginesSyncTest : public FeatureToggler, public SyncTest {
class TwoClientSearchEnginesSyncTest : public SyncTest {
public:
TwoClientSearchEnginesSyncTest()
: FeatureToggler(switches::kSyncPseudoUSSSearchEngines),
SyncTest(TWO_CLIENT) {}
TwoClientSearchEnginesSyncTest() : SyncTest(TWO_CLIENT) {}
~TwoClientSearchEnginesSyncTest() override {}
private:
DISALLOW_COPY_AND_ASSIGN(TwoClientSearchEnginesSyncTest);
};
IN_PROC_BROWSER_TEST_P(TwoClientSearchEnginesSyncTest, E2E_ENABLED(Add)) {
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, E2E_ENABLED(Add)) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// TODO(crbug.com/953711): Ideally we could immediately assert
// search_engines_helper::AllServicesMatch(), but that's not possible today
......@@ -45,7 +42,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientSearchEnginesSyncTest, E2E_ENABLED(Add)) {
ASSERT_TRUE(search_engines_helper::HasSearchEngine(1, search_engine_seed));
}
IN_PROC_BROWSER_TEST_P(TwoClientSearchEnginesSyncTest, E2E_ENABLED(Delete)) {
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, E2E_ENABLED(Delete)) {
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,7 +64,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientSearchEnginesSyncTest, E2E_ENABLED(Delete)) {
ASSERT_FALSE(search_engines_helper::HasSearchEngine(1, search_engine_seed));
}
IN_PROC_BROWSER_TEST_P(TwoClientSearchEnginesSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest,
E2E_ENABLED(AddMultiple)) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// TODO(crbug.com/953711): Ideally we could immediately assert
......@@ -82,7 +79,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientSearchEnginesSyncTest,
ASSERT_TRUE(SearchEnginesMatchChecker().Wait());
}
IN_PROC_BROWSER_TEST_P(TwoClientSearchEnginesSyncTest, Duplicates) {
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, Duplicates) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// TODO(crbug.com/953711): Ideally we could immediately assert
// search_engines_helper::AllServicesMatch(), but that's not possible today
......@@ -102,7 +99,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientSearchEnginesSyncTest, Duplicates) {
ASSERT_TRUE(SearchEnginesMatchChecker().Wait());
}
IN_PROC_BROWSER_TEST_P(TwoClientSearchEnginesSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest,
E2E_ENABLED(UpdateKeyword)) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// TODO(crbug.com/953711): Ideally we could immediately assert
......@@ -122,7 +119,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientSearchEnginesSyncTest,
ASSERT_TRUE(SearchEnginesMatchChecker().Wait());
}
IN_PROC_BROWSER_TEST_P(TwoClientSearchEnginesSyncTest, E2E_ENABLED(UpdateUrl)) {
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, E2E_ENABLED(UpdateUrl)) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// TODO(crbug.com/953711): Ideally we could immediately assert
// search_engines_helper::AllServicesMatch(), but that's not possible today
......@@ -141,7 +138,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientSearchEnginesSyncTest, E2E_ENABLED(UpdateUrl)) {
ASSERT_TRUE(SearchEnginesMatchChecker().Wait());
}
IN_PROC_BROWSER_TEST_P(TwoClientSearchEnginesSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest,
E2E_ENABLED(UpdateName)) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// TODO(crbug.com/953711): Ideally we could immediately assert
......@@ -160,7 +157,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientSearchEnginesSyncTest,
ASSERT_TRUE(SearchEnginesMatchChecker().Wait());
}
IN_PROC_BROWSER_TEST_P(TwoClientSearchEnginesSyncTest, ConflictKeyword) {
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, ConflictKeyword) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
DisableVerifier();
// TODO(crbug.com/953711): Ideally we could immediately assert
......@@ -183,7 +180,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientSearchEnginesSyncTest, ConflictKeyword) {
ASSERT_TRUE(search_engines_helper::AllServicesMatch());
}
IN_PROC_BROWSER_TEST_P(TwoClientSearchEnginesSyncTest, MergeMultiple) {
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, MergeMultiple) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
DisableVerifier();
// TODO(crbug.com/953711): Ideally we could immediately assert
......@@ -211,7 +208,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientSearchEnginesSyncTest, MergeMultiple) {
ASSERT_TRUE(search_engines_helper::AllServicesMatch());
}
IN_PROC_BROWSER_TEST_P(TwoClientSearchEnginesSyncTest, DisableSync) {
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, DisableSync) {
ASSERT_TRUE(SetupSync());
// TODO(crbug.com/953711): Ideally we could immediately assert
// search_engines_helper::AllServicesMatch(), but that's not possible today
......@@ -229,7 +226,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientSearchEnginesSyncTest, DisableSync) {
ASSERT_TRUE(search_engines_helper::AllServicesMatch());
}
IN_PROC_BROWSER_TEST_P(TwoClientSearchEnginesSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest,
E2E_ENABLED(SyncDefault)) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// TODO(crbug.com/953711): Ideally we could immediately assert
......@@ -249,7 +246,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientSearchEnginesSyncTest,
// Ensure that we can change the search engine and immediately delete it
// without putting the clients out of sync.
IN_PROC_BROWSER_TEST_P(TwoClientSearchEnginesSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest,
E2E_ENABLED(DeleteSyncedDefault)) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// TODO(crbug.com/953711): Ideally we could immediately assert
......@@ -269,7 +266,3 @@ IN_PROC_BROWSER_TEST_P(TwoClientSearchEnginesSyncTest,
search_engines_helper::DeleteSearchEngineBySeed(0, 0);
ASSERT_TRUE(SearchEnginesMatchChecker().Wait());
}
INSTANTIATE_TEST_SUITE_P(USS,
TwoClientSearchEnginesSyncTest,
::testing::Values(false, true));
......@@ -3,12 +3,10 @@
// found in the LICENSE file.
#include "base/macros.h"
#include "chrome/browser/sync/test/integration/feature_toggler.h"
#include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
#include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/sync/test/integration/themes_helper.h"
#include "components/sync/driver/sync_driver_switches.h"
namespace {
......@@ -21,10 +19,10 @@ using themes_helper::UsingCustomTheme;
using themes_helper::UsingDefaultTheme;
using themes_helper::UsingSystemTheme;
class TwoClientThemesSyncTest : public FeatureToggler, public SyncTest {
class TwoClientThemesSyncTest : public SyncTest {
public:
TwoClientThemesSyncTest()
: FeatureToggler(switches::kSyncPseudoUSSThemes), SyncTest(TWO_CLIENT) {}
TwoClientThemesSyncTest() : SyncTest(TWO_CLIENT) {}
~TwoClientThemesSyncTest() override {}
// Needed for AwaitQuiescence().
......@@ -37,7 +35,7 @@ class TwoClientThemesSyncTest : public FeatureToggler, public SyncTest {
// Starts with default themes, then sets up sync and uses it to set all
// profiles to use a custom theme. Does not actually install any themes, but
// instead verifies the custom theme is pending for install.
IN_PROC_BROWSER_TEST_P(TwoClientThemesSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest,
E2E_ENABLED(DefaultThenSyncCustom)) {
ASSERT_TRUE(SetupSync());
// Wait until sync settles before we override the theme below.
......@@ -61,7 +59,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientThemesSyncTest,
// Starts with custom themes, then sets up sync and uses it to set all profiles
// to the system theme.
IN_PROC_BROWSER_TEST_P(TwoClientThemesSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest,
E2E_ENABLED(CustomThenSyncNative)) {
ASSERT_TRUE(SetupClients());
......@@ -83,7 +81,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientThemesSyncTest,
// Starts with custom themes, then sets up sync and uses it to set all profiles
// to the default theme.
IN_PROC_BROWSER_TEST_P(TwoClientThemesSyncTest,
IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest,
E2E_ENABLED(CustomThenSyncDefault)) {
ASSERT_TRUE(SetupClients());
......@@ -106,7 +104,7 @@ IN_PROC_BROWSER_TEST_P(TwoClientThemesSyncTest,
//
// Most other tests have significant coverage of model association. This test
// is intended to test steady-state scenarios.
IN_PROC_BROWSER_TEST_P(TwoClientThemesSyncTest, E2E_ENABLED(CycleOptions)) {
IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, E2E_ENABLED(CycleOptions)) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
// Wait until sync settles before we override the theme below.
AwaitQuiescence();
......@@ -135,8 +133,4 @@ IN_PROC_BROWSER_TEST_P(TwoClientThemesSyncTest, E2E_ENABLED(CycleOptions)) {
EXPECT_EQ(GetCustomTheme(1), GetThemeID(GetProfile(0)));
}
INSTANTIATE_TEST_SUITE_P(USS,
TwoClientThemesSyncTest,
::testing::Values(false, true));
} // namespace
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