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

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

Issue 2277963002: Add placeholders when lists are empty for passwords and autofill. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback and Add Tests Created 4 years, 4 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/test/data/webui/settings/settings_autofill_section_browsertest.js ('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/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 f4426c10ee6c1437a5679e5cf27d1894a682e91b..cc41d915a36c5811eb9ccbe34021efc018c1a5eb 100644
--- a/chrome/test/data/webui/settings/settings_passwords_section_browsertest.js
+++ b/chrome/test/data/webui/settings/settings_passwords_section_browsertest.js
@@ -183,6 +183,19 @@ TEST_F('SettingsPasswordSectionBrowserTest', 'uiTests', function() {
var self = this;
suite('PasswordsSection', function() {
+ test('verifyNoSavedPasswords', function() {
+ assertEquals(self.browsePreload, document.location.href);
+
+ var passwordsSection = self.createPasswordsSection_([], []);
+
+ self.validatePasswordList(
+ self.getIronListChildren_(passwordsSection.$.passwordList),
+ []);
+
+ assertFalse(passwordsSection.$.noPasswordsLabel.hidden);
+ assertTrue(passwordsSection.$.savedPasswordsHeading.hidden);
+ });
+
test('verifySavedPasswordLength', function() {
assertEquals(self.browsePreload, document.location.href);
@@ -204,6 +217,9 @@ TEST_F('SettingsPasswordSectionBrowserTest', 'uiTests', function() {
self.validatePasswordList(
self.getIronListChildren_(passwordsSection.$.passwordList),
passwordList);
+
+ assertTrue(passwordsSection.$.noPasswordsLabel.hidden);
+ assertFalse(passwordsSection.$.savedPasswordsHeading.hidden);
});
// Test verifies that removing a password will update the elements.
@@ -332,6 +348,16 @@ TEST_F('SettingsPasswordSectionBrowserTest', 'uiTests', function() {
expectedExceptionList);
});
+ test('verifyNoPasswordExceptions', function() {
+ var passwordsSection = self.createPasswordsSection_([], []);
+
+ self.validateExceptionList_(
+ self.getDomRepeatChildren_(passwordsSection.$.passwordExceptionsList),
+ []);
+
+ assertFalse(passwordsSection.$.noExceptionsLabel.hidden);
+ });
+
test('verifyPasswordExceptions', function() {
var exceptionList = [
FakeDataMaker.exceptionEntry('docs.google.com'),
@@ -347,6 +373,8 @@ TEST_F('SettingsPasswordSectionBrowserTest', 'uiTests', function() {
self.validateExceptionList_(
self.getDomRepeatChildren_(passwordsSection.$.passwordExceptionsList),
exceptionList);
+
+ assertTrue(passwordsSection.$.noExceptionsLabel.hidden);
});
// Test verifies that removing an exception will update the elements.
« no previous file with comments | « chrome/test/data/webui/settings/settings_autofill_section_browsertest.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698