Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1972)

Unified Diff: chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/SyncCustomizationFragmentTest.java

Issue 2035893002: [Sync] Fix minor credit card sync UI glitch on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a regression test. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncCustomizationFragment.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
*
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncCustomizationFragment.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698