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

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

Issue 2179093002: [Sync] No two error messages at same time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format Created 4 years, 5 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/PassphraseCreationDialogFragment.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 65e5ca7329bd5bd3c5be6b73d372e71302cfa0da..d373fbd183dbb7d8ba14e9cdbae11b720e6141c1 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
@@ -548,32 +548,42 @@ public class SyncCustomizationFragmentTest extends SyncTestBase {
clickButton(okButton);
assertTrue(pcdf.isResumed());
assertNotNull(enterPassphrase.getError());
+ assertNull(confirmPassphrase.getError());
// Error if you try to submit with only the first box filled.
clearError(confirmPassphrase);
setText(enterPassphrase, "foo");
clickButton(okButton);
assertTrue(pcdf.isResumed());
+ assertNull(enterPassphrase.getError());
assertNotNull(confirmPassphrase.getError());
- // Error if you try to submit with only the second box filled.
+ // Remove first box should only show empty error message
setText(enterPassphrase, "");
+ clickButton(okButton);
+ assertNotNull(enterPassphrase.getError());
+ assertNull(confirmPassphrase.getError());
+
+ // Error if you try to submit with only the second box filled.
clearError(confirmPassphrase);
setText(confirmPassphrase, "foo");
clickButton(okButton);
assertTrue(pcdf.isResumed());
+ assertNull(enterPassphrase.getError());
assertNotNull(confirmPassphrase.getError());
// No error if text doesn't match without button press.
setText(enterPassphrase, "foo");
clearError(confirmPassphrase);
setText(confirmPassphrase, "bar");
+ assertNull(enterPassphrase.getError());
assertNull(confirmPassphrase.getError());
// Error if you try to submit unmatching text.
clearError(confirmPassphrase);
clickButton(okButton);
assertTrue(pcdf.isResumed());
+ assertNull(enterPassphrase.getError());
assertNotNull(confirmPassphrase.getError());
// Success if text matches.
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseCreationDialogFragment.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698