| Index: chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/SyncCustomizationFragmentTest.java
|
| diff --git a/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/SyncCustomizationFragmentTest.java b/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/SyncCustomizationFragmentTest.java
|
| index 759002fcc29d2439ba469ad6200c7b97a4166f91..d083d1864bbff3c4418a887fa1468b3d327b3d02 100644
|
| --- a/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/SyncCustomizationFragmentTest.java
|
| +++ b/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/SyncCustomizationFragmentTest.java
|
| @@ -407,6 +407,42 @@ public class SyncCustomizationFragmentTest extends SyncTestBase {
|
| closeFragment(fragment);
|
| assertPaymentsIntegrationEnabled(true);
|
| }
|
| +
|
| + @SmallTest
|
| + @Feature({"Sync"})
|
| + public void testPaymentsIntegrationEnabledBySyncEverything() throws Exception {
|
| + setUpTestAccountAndSignIn();
|
| + setPaymentsIntegrationEnabled(false);
|
| + disableDataType(ModelType.AUTOFILL);
|
| +
|
| + // Get the UI elements.
|
| + SyncCustomizationFragment fragment = startSyncCustomizationFragment();
|
| + SwitchPreference syncEverything = getSyncEverything(fragment);
|
| + CheckBoxPreference syncAutofill = (CheckBoxPreference) fragment.findPreference(
|
| + SyncCustomizationFragment.PREFERENCE_SYNC_AUTOFILL);
|
| + CheckBoxPreference paymentsIntegration = (CheckBoxPreference) fragment.findPreference(
|
| + SyncCustomizationFragment.PREFERENCE_PAYMENTS_INTEGRATION);
|
| +
|
| + // All three are unchecked and payments is disabled.
|
| + assertFalse(syncEverything.isChecked());
|
| + assertFalse(syncAutofill.isChecked());
|
| + assertTrue(syncAutofill.isEnabled());
|
| + assertFalse(paymentsIntegration.isChecked());
|
| + assertFalse(paymentsIntegration.isEnabled());
|
| +
|
| + // All three are checked after toggling sync everything.
|
| + togglePreference(syncEverything);
|
| + assertTrue(syncEverything.isChecked());
|
| + assertTrue(syncAutofill.isChecked());
|
| + assertFalse(syncAutofill.isEnabled());
|
| + assertTrue(paymentsIntegration.isChecked());
|
| + assertFalse(paymentsIntegration.isEnabled());
|
| +
|
| + // Closing the fragment enabled payments integration.
|
| + closeFragment(fragment);
|
| + assertPaymentsIntegrationEnabled(true);
|
| + }
|
| +
|
| /**
|
| * Test that choosing a passphrase type while sync is off doesn't crash.
|
| *
|
|
|