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

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

Issue 2428733002: MD Settings: Migrating autofill cr-shared-menu to settings-action-menu. (Closed)
Patch Set: Re-sort 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/resources/settings/passwords_and_forms_page/compiled_resources2.gyp ('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_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 c3b7c61709c473fd0be4ff80b524b1efbc405276..988b092d2923d69395b22fafec1cf3a83be5f7fc 100644
--- a/chrome/test/data/webui/settings/settings_autofill_section_browsertest.js
+++ b/chrome/test/data/webui/settings/settings_autofill_section_browsertest.js
@@ -9,8 +9,7 @@ var ROOT_PATH = '../../../../../';
// Polymer BrowserTest fixture.
GEN_INCLUDE([
- ROOT_PATH + 'chrome/test/data/webui/polymer_browser_test_base.js',
- ROOT_PATH + 'ui/webui/resources/js/load_time_data.js',
+ ROOT_PATH + 'chrome/test/data/webui/polymer_browser_test_base.js',
]);
/**
@@ -24,9 +23,9 @@ CountryDetailManagerTestImpl.prototype = {
getCountryList: function() {
return new Promise(function(resolve) {
resolve([
- {name: 'United States', countryCode: 'US'}, // Default test country.
- {name: 'Israel', countryCode: 'IL'},
- {name: 'United Kingdom', countryCode: 'GB'},
+ {name: 'United States', countryCode: 'US'}, // Default test country.
+ {name: 'Israel', countryCode: 'IL'},
+ {name: 'United Kingdom', countryCode: 'GB'},
]);
});
},
@@ -47,7 +46,7 @@ CountryDetailManagerTestImpl.prototype = {
* @return {!Promise}
*/
function asyncForEach(items, loopBody) {
- return new Promise(function(finish) {
+ return new Promise(function(resolve) {
var index = 0;
function loop() {
@@ -55,7 +54,7 @@ function asyncForEach(items, loopBody) {
if (item)
loopBody(item).then(loop);
else
- finish();
+ resolve();
};
loop();
@@ -108,13 +107,6 @@ SettingsAutofillSectionBrowserTest.prototype = {
*/
runAccessibilityChecks: false,
- i18nStrings: {
- addAddressTitle: 'add-title',
- addCreditCardTitle: 'add-title',
- editAddressTitle: 'edit-title',
- editCreditCardTitle: 'edit-title',
- },
-
/** @override */
setUp: function() {
PolymerTest.prototype.setUp.call(this);
@@ -122,9 +114,6 @@ SettingsAutofillSectionBrowserTest.prototype = {
// Test is run on an individual element that won't have a page language.
this.accessibilityAuditConfig.auditRulesToIgnore.push('humanLangMissing');
- // Faking 'strings.js' for this test.
- loadTimeData.data = this.i18nStrings;
-
settings.address.CountryDetailManagerImpl.instance_ =
new CountryDetailManagerTestImpl();
},
@@ -410,7 +399,7 @@ TEST_F('SettingsAutofillSectionBrowserTest', 'AddressTests', function() {
return self.createAddressDialog_(
FakeDataMaker.emptyAddressEntry()).then(function(dialog) {
var title = dialog.$$('.title');
- assertEquals(self.i18nStrings.addAddressTitle, title.textContent);
+ assertEquals(loadTimeData.getString('addAddress'), title.textContent);
// Shouldn't be possible to save until something is typed in.
assertTrue(dialog.$.saveButton.disabled);
});
@@ -420,7 +409,8 @@ TEST_F('SettingsAutofillSectionBrowserTest', 'AddressTests', function() {
return self.createAddressDialog_(
FakeDataMaker.addressEntry()).then(function(dialog) {
var title = dialog.$$('.title');
- assertEquals(self.i18nStrings.editAddressTitle, title.textContent);
+ assertEquals(
+ loadTimeData.getString('editAddressTitle'), title.textContent);
// Should be possible to save when editing because fields are populated.
assertFalse(dialog.$.saveButton.disabled);
});
« no previous file with comments | « chrome/browser/resources/settings/passwords_and_forms_page/compiled_resources2.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698