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

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

Issue 2850663002: MD-Settings - Add test for federated password dialog. (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | 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/settings_passwords_section_browsertest.js
diff --git a/chrome/test/data/webui/settings/settings_passwords_section_browsertest.js b/chrome/test/data/webui/settings/settings_passwords_section_browsertest.js
index 5b33ab3f02accf4b2582bc1d09d5992903200efe..e0b55aabc610dbb3f34342828275c9dfe77eca4c 100644
--- a/chrome/test/data/webui/settings/settings_passwords_section_browsertest.js
+++ b/chrome/test/data/webui/settings/settings_passwords_section_browsertest.js
@@ -444,11 +444,28 @@ TEST_F('SettingsPasswordSectionBrowserTest', 'uiTests', function() {
clickRemoveButton();
});
+ test('verifyFederatedPassword', function() {
+ var item = FakeDataMaker.passwordEntry('goo.gl', 'bart', 0);
+ item.federationText = 'with chromium.org';
+ var passwordDialog = createPasswordDialog(item);
+
+ Polymer.dom.flush();
+
+ assertEquals(item.federationText,
+ passwordDialog.$.passwordInput.value);
+ // Text should be readable.
+ assertEquals('text',
+ passwordDialog.$.passwordInput.type);
+ assertTrue(passwordDialog.$.showPasswordButton.hidden);
+ });
+
test('showSavedPassword', function() {
var PASSWORD = 'bAn@n@5';
var item = FakeDataMaker.passwordEntry('goo.gl', 'bart', PASSWORD.length);
var passwordDialog = createPasswordDialog(item);
+ assertFalse(passwordDialog.$.showPasswordButton.hidden);
+
passwordDialog.password = PASSWORD;
passwordDialog.showPassword = true;
@@ -459,6 +476,7 @@ TEST_F('SettingsPasswordSectionBrowserTest', 'uiTests', function() {
// Password should be visible.
assertEquals('text',
passwordDialog.$.passwordInput.type);
+ assertFalse(passwordDialog.$.showPasswordButton.hidden);
});
// Test will timeout if event is not received.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698