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

Unified Diff: chrome/test/data/webui/settings/settings_autofill_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
Index: chrome/test/data/webui/settings/settings_autofill_section_browsertest.js
diff --git a/chrome/test/data/webui/settings/settings_autofill_section_browsertest.js b/chrome/test/data/webui/settings/settings_autofill_section_browsertest.js
index 0939b41253bfb12f2d5434daf557d851da499bf4..03203b939ea0283c3aa037149bf927ad5446035c 100644
--- a/chrome/test/data/webui/settings/settings_autofill_section_browsertest.js
+++ b/chrome/test/data/webui/settings/settings_autofill_section_browsertest.js
@@ -180,6 +180,19 @@ TEST_F('SettingsAutofillSectionBrowserTest', 'CreditCardTests', function() {
suite('AutofillSection', function() {
test('verifyCreditCardCount', function() {
+ var section = self.createAutofillSection_([], []);
+ assertTrue(!!section);
+
+ var creditCardList = section.$.creditCardList;
+ assertTrue(!!creditCardList);
+ // +1 for the template element.
+ assertEquals(1, creditCardList.children.length);
+
+ assertFalse(section.$.noCreditCardsLabel.hidden);
+ assertTrue(section.$.creditCardsHeading.hidden);
+ });
+
+ test('verifyCreditCardCount', function() {
var creditCards = [
FakeDataMaker.creditCardEntry(),
FakeDataMaker.creditCardEntry(),
@@ -196,6 +209,9 @@ TEST_F('SettingsAutofillSectionBrowserTest', 'CreditCardTests', function() {
assertTrue(!!creditCardList);
// +1 for the template element.
assertEquals(creditCards.length + 1, creditCardList.children.length);
+
+ assertTrue(section.$.noCreditCardsLabel.hidden);
+ assertFalse(section.$.creditCardsHeading.hidden);
});
test('verifyCreditCardFields', function() {
@@ -320,6 +336,18 @@ TEST_F('SettingsAutofillSectionBrowserTest', 'AddressTests', function() {
var self = this;
suite('AutofillSection', function() {
+ test('verifyNoAddresses', function() {
+ var section = self.createAutofillSection_([], []);
+ assertTrue(!!section);
+
+ var addressList = section.$.addressList;
+ assertTrue(!!addressList);
+ // 1 for the template element.
+ assertEquals(1, addressList.children.length);
+
+ assertFalse(section.$.noAddressesLabel.hidden);
+ });
+
test('verifyAddressCount', function() {
var addresses = [
FakeDataMaker.addressEntry(),
@@ -336,6 +364,8 @@ TEST_F('SettingsAutofillSectionBrowserTest', 'AddressTests', function() {
assertTrue(!!addressList);
// +1 for the template element.
assertEquals(addresses.length + 1, addressList.children.length);
+
+ assertTrue(section.$.noAddressesLabel.hidden);
});
test('verifyAddressFields', function() {

Powered by Google App Engine
This is Rietveld 408576698