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

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

Issue 2170713002: Use dom-repeat for addresses, credit cards, and exceptions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Verify Template is a Template 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
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 baaa82ca6c602d014cf079a4db3845dcccf96cee..afc11570c31a1dc76da58e733f2aeb0be80f427a 100644
--- a/chrome/test/data/webui/settings/settings_autofill_section_browsertest.js
+++ b/chrome/test/data/webui/settings/settings_autofill_section_browsertest.js
@@ -129,17 +129,6 @@ SettingsAutofillSectionBrowserTest.prototype = {
},
/**
- * Allow the iron-list to be sized properly.
- * @param {!Object} autofillSection
- * @private
- */
- flushAutofillSection_: function(autofillSection) {
- autofillSection.$.addressList.notifyResize();
- autofillSection.$.creditCardList.notifyResize();
- Polymer.dom.flush();
- },
-
- /**
* Creates the autofill section for the given lists.
* @param {!Array<!chrome.passwordsPrivate.PasswordUiEntry>} passwordList
* @param {!Array<!chrome.passwordsPrivate.ExceptionPair>} exceptionList
@@ -151,7 +140,7 @@ SettingsAutofillSectionBrowserTest.prototype = {
section.addresses = addresses;
section.creditCards = creditCards;
document.body.appendChild(section);
- this.flushAutofillSection_(section);
+ Polymer.dom.flush();
return section;
},
@@ -205,7 +194,6 @@ TEST_F('SettingsAutofillSectionBrowserTest', 'CreditCardTests', function() {
assertTrue(!!section);
var creditCardList = section.$.creditCardList;
assertTrue(!!creditCardList);
- assertEquals(creditCards, creditCardList.items);
// +1 for the template element.
assertEquals(creditCards.length + 1, creditCardList.children.length);
});
@@ -214,7 +202,7 @@ TEST_F('SettingsAutofillSectionBrowserTest', 'CreditCardTests', function() {
var creditCard = FakeDataMaker.creditCardEntry();
var section = self.createAutofillSection_([], [creditCard]);
var creditCardList = section.$.creditCardList;
- var row = creditCardList.children[1]; // Skip over the template.
+ var row = creditCardList.children[0];
assertTrue(!!row);
assertEquals(creditCard.metadata.summaryLabel,
@@ -346,7 +334,6 @@ TEST_F('SettingsAutofillSectionBrowserTest', 'AddressTests', function() {
assertTrue(!!section);
var addressList = section.$.addressList;
assertTrue(!!addressList);
- assertEquals(addresses, addressList.items);
// +1 for the template element.
assertEquals(addresses.length + 1, addressList.children.length);
});
@@ -355,7 +342,7 @@ TEST_F('SettingsAutofillSectionBrowserTest', 'AddressTests', function() {
var address = FakeDataMaker.addressEntry();
var section = self.createAutofillSection_([address], []);
var addressList = section.$.addressList;
- var row = addressList.children[1]; // Skip over the template.
+ var row = addressList.children[0];
assertTrue(!!row);
var addressSummary = address.metadata.summaryLabel +

Powered by Google App Engine
This is Rietveld 408576698