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