Commit 764db2c5 authored by Jan Krcal's avatar Jan Krcal Committed by Commit Bot

[AF Wallet] Stop running Directory Wallet data integration tests

After a full launch of UssWalletData on Stable, this CL simplifies
parametrization for sync_intgration tests. From now on, we only switch
between Directory and USS implementation of WalletMetadata.

Bug: 853688
Change-Id: I500bbb66b5aed65d27ea9e4955bbfb4e31023630
Reviewed-on: https://chromium-review.googlesource.com/c/1489194
Commit-Queue: Jan Krcal <jkrcal@chromium.org>
Auto-Submit: Jan Krcal <jkrcal@chromium.org>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#635926}
parent 5b8a2069
...@@ -610,23 +610,9 @@ IN_PROC_BROWSER_TEST_P(SingleClientWalletSyncTestWithDefaultFeatures, ...@@ -610,23 +610,9 @@ IN_PROC_BROWSER_TEST_P(SingleClientWalletSyncTestWithDefaultFeatures,
ExpectNoHistogramsForAddressesDiff(); ExpectNoHistogramsForAddressesDiff();
} }
class SingleClientWalletSyncTestWithDataUss // Check on top of EmptyUpdatesAreIgnored that the new progress marker is stored
: public UssWalletSwitchToggler, // for empty updates. This is a regression test for crbug.com/924447.
public SingleClientWalletSyncTest { IN_PROC_BROWSER_TEST_P(SingleClientWalletSyncTestWithDefaultFeatures,
public:
SingleClientWalletSyncTestWithDataUss() {
InitWithFeatures(
/*enabled_features=*/{switches::kSyncUSSAutofillWalletData},
/*disabled_features=*/{});
}
};
// Check on top of
// SingleClientWalletSyncTestWithDefaultFeatures.EmptyUpdatesAreIgnored that the
// new progress marker is stored for empty updates. This is a regression test
// for crbug.com/924447 (and restricts to USS because the bug cannot exist for
// Directory and because the USS implementation is launching).
IN_PROC_BROWSER_TEST_P(SingleClientWalletSyncTestWithDataUss,
EmptyUpdatesUpdateProgressMarker) { EmptyUpdatesUpdateProgressMarker) {
GetFakeServer()->SetWalletData( GetFakeServer()->SetWalletData(
{CreateSyncWalletCard(/*name=*/"card-1", /*last_four=*/"0001", {CreateSyncWalletCard(/*name=*/"card-1", /*last_four=*/"0001",
...@@ -1418,31 +1404,16 @@ IN_PROC_BROWSER_TEST_P(SingleClientWalletWithAccountStorageSyncTest, ...@@ -1418,31 +1404,16 @@ IN_PROC_BROWSER_TEST_P(SingleClientWalletWithAccountStorageSyncTest,
INSTANTIATE_TEST_SUITE_P(USS, INSTANTIATE_TEST_SUITE_P(USS,
SingleClientWalletSyncTestWithoutAccountStorage, SingleClientWalletSyncTestWithoutAccountStorage,
::testing::Values(std::make_pair(false, false), ::testing::Values(false, true));
std::make_pair(true, false),
std::make_pair(true, true)));
// Depends on SyncUSSWalletData, cannot set the first param to false.
INSTANTIATE_TEST_SUITE_P(USS, INSTANTIATE_TEST_SUITE_P(USS,
SingleClientWalletWithAccountStorageSyncTest, SingleClientWalletWithAccountStorageSyncTest,
::testing::Values(std::make_pair(true, false), ::testing::Values(false, true));
std::make_pair(true, true)));
INSTANTIATE_TEST_SUITE_P(USS, INSTANTIATE_TEST_SUITE_P(USS,
SingleClientWalletSyncTestWithDefaultFeatures, SingleClientWalletSyncTestWithDefaultFeatures,
::testing::Values(std::make_pair(false, false), ::testing::Values(false, true));
std::make_pair(true, false),
std::make_pair(true, true)));
// TODO(jkrcal): Merge this with SingleClientWalletSyncTestWithDefaultFeatures
// once wallet data USS is launched. https://crbug.com/853688.
INSTANTIATE_TEST_SUITE_P(USS,
SingleClientWalletSyncTestWithDataUss,
::testing::Values(std::make_pair(true, false),
std::make_pair(true, true)));
// Depends on SyncUSSWalletData, cannot set the first param to false.
INSTANTIATE_TEST_SUITE_P(USS, INSTANTIATE_TEST_SUITE_P(USS,
SingleClientWalletSecondaryAccountSyncTest, SingleClientWalletSecondaryAccountSyncTest,
::testing::Values(std::make_pair(true, false), ::testing::Values(false, true));
std::make_pair(true, true)));
...@@ -684,8 +684,6 @@ IN_PROC_BROWSER_TEST_P(TwoClientWalletSyncTest, ...@@ -684,8 +684,6 @@ IN_PROC_BROWSER_TEST_P(TwoClientWalletSyncTest,
INSTANTIATE_TEST_SUITE_P(USS, INSTANTIATE_TEST_SUITE_P(USS,
TwoClientWalletSyncTest, TwoClientWalletSyncTest,
::testing::Values(std::make_pair(false, false), ::testing::Values(false, true));
std::make_pair(true, false),
std::make_pair(true, true)));
} // namespace } // namespace
...@@ -587,12 +587,7 @@ void UssWalletSwitchToggler::InitWithDefaultFeatures() { ...@@ -587,12 +587,7 @@ void UssWalletSwitchToggler::InitWithDefaultFeatures() {
void UssWalletSwitchToggler::InitWithFeatures( void UssWalletSwitchToggler::InitWithFeatures(
std::vector<base::Feature> enabled_features, std::vector<base::Feature> enabled_features,
std::vector<base::Feature> disabled_features) { std::vector<base::Feature> disabled_features) {
if (GetParam().first) { if (GetParam()) {
enabled_features.push_back(switches::kSyncUSSAutofillWalletData);
} else {
disabled_features.push_back(switches::kSyncUSSAutofillWalletData);
}
if (GetParam().second) {
enabled_features.push_back(switches::kSyncUSSAutofillWalletMetadata); enabled_features.push_back(switches::kSyncUSSAutofillWalletMetadata);
} else { } else {
disabled_features.push_back(switches::kSyncUSSAutofillWalletMetadata); disabled_features.push_back(switches::kSyncUSSAutofillWalletMetadata);
......
...@@ -156,12 +156,11 @@ class AutofillWalletMetadataSizeChecker ...@@ -156,12 +156,11 @@ class AutofillWalletMetadataSizeChecker
const int profile_b_; const int profile_b_;
}; };
// Class that enables or disables USS based on test parameter. Must be the first // Class that enables or disables USS for Wallet metadata based on test
// base class of the test fixture. // parameter. Must be the first base class of the test fixture.
// TODO(jkrcal): When the new implementation fully launches, remove this class, // TODO(jkrcal): When the new implementation fully launches, remove this class,
// convert all tests from *_P back to *_F and remove the instance at the end. // convert all tests from *_P back to *_F and remove the instance at the end.
class UssWalletSwitchToggler class UssWalletSwitchToggler : public testing::WithParamInterface<bool> {
: public testing::WithParamInterface<std::pair<bool, bool>> {
public: public:
UssWalletSwitchToggler(); UssWalletSwitchToggler();
......
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