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

Unified Diff: chrome/test/data/webui/settings/people_page_sync_page_test.js

Issue 2441503002: [MD Settings][People] Visual updates to the sync setup page. (Closed)
Patch Set: Addressed comment Created 4 years, 2 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/browser/ui/webui/settings/people_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/settings/people_page_sync_page_test.js
diff --git a/chrome/test/data/webui/settings/people_page_sync_page_test.js b/chrome/test/data/webui/settings/people_page_sync_page_test.js
index fe8be556e735f9a144be7c80ccd3846bd6991f4f..e39cc91fc850988250e4a6feb183aad3f46a83be 100644
--- a/chrome/test/data/webui/settings/people_page_sync_page_test.js
+++ b/chrome/test/data/webui/settings/people_page_sync_page_test.js
@@ -263,27 +263,27 @@ cr.define('settings_people_page_sync_page', function() {
assertTrue(encryptWithPassphrase.checked);
});
- test('CreatingPassphraseEmptyPassphrase', function() {
+ test('SaveButtonDisabledWhenPassphraseOrConfirmationEmpty', function() {
MockInteractions.tap(encryptWithPassphrase);
Polymer.dom.flush();
assertTrue(!!syncPage.$$('#create-password-box'));
var saveNewPassphrase = syncPage.$$('#saveNewPassphrase');
- assertTrue(!!saveNewPassphrase);
-
- MockInteractions.tap(saveNewPassphrase);
- Polymer.dom.flush();
-
var passphraseInput = syncPage.$$('#passphraseInput');
var passphraseConfirmationInput =
syncPage.$$('#passphraseConfirmationInput');
- assertTrue(!!passphraseInput);
- assertTrue(!!passphraseConfirmationInput);
- assertTrue(passphraseInput.invalid);
- assertFalse(passphraseConfirmationInput.invalid);
+ passphraseInput.value = '';
+ passphraseConfirmationInput.value = '';
+ assertTrue(saveNewPassphrase.disabled);
- assertFalse(syncPage.syncPrefs.encryptAllData);
+ passphraseInput.value = 'foo';
+ passphraseConfirmationInput.value = '';
+ assertTrue(saveNewPassphrase.disabled);
+
+ passphraseInput.value = 'foo';
+ passphraseConfirmationInput.value = 'bar';
+ assertFalse(saveNewPassphrase.disabled);
});
test('CreatingPassphraseMismatchedPassphrase', function() {
@@ -355,6 +355,25 @@ cr.define('settings_people_page_sync_page', function() {
assertTrue(syncPage.$.encryptionRadioGroupContainer.hidden);
});
+ test('ExistingPassphraseSubmitButtonDisabledWhenExistingPassphraseEmpty',
+ function() {
+ var prefs = getSyncAllPrefs();
+ prefs.encryptAllData = true;
+ prefs.passphraseRequired = true;
+ cr.webUIListenerCallback('sync-prefs-changed', prefs);
+
+ Polymer.dom.flush();
+
+ var existingPassphraseInput = syncPage.$$('#existingPassphraseInput');
+ var submitExistingPassphrase = syncPage.$$('#submitExistingPassphrase');
+
+ existingPassphraseInput.value = '';
+ assertTrue(submitExistingPassphrase.disabled);
+
+ existingPassphraseInput.value = 'foo';
+ assertFalse(submitExistingPassphrase.disabled);
+ });
+
test('EnterExistingWrongPassphrase', function() {
var prefs = getSyncAllPrefs();
prefs.encryptAllData = true;
« no previous file with comments | « chrome/browser/ui/webui/settings/people_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698