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

Side by Side Diff: chrome/test/data/webui/settings/settings_autofill_section_browsertest.js

Issue 2627123002: Load Passwords and Autofill in the corresponding sub page. (Closed)
Patch Set: Add missing @private Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** @fileoverview Runs the Polymer Autofill Settings tests. */ 5 /** @fileoverview Runs the Polymer Autofill Settings tests. */
6 6
7 /** @const {string} Path to root from chrome/test/data/webui/settings/. */ 7 /** @const {string} Path to root from chrome/test/data/webui/settings/. */
8 var ROOT_PATH = '../../../../../'; 8 var ROOT_PATH = '../../../../../';
9 9
10 // Polymer BrowserTest fixture. 10 // Polymer BrowserTest fixture.
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 }, 119 },
120 120
121 /** 121 /**
122 * Creates the autofill section for the given lists. 122 * Creates the autofill section for the given lists.
123 * @param {!Array<!chrome.passwordsPrivate.PasswordUiEntry>} passwordList 123 * @param {!Array<!chrome.passwordsPrivate.PasswordUiEntry>} passwordList
124 * @param {!Array<!chrome.passwordsPrivate.ExceptionPair>} exceptionList 124 * @param {!Array<!chrome.passwordsPrivate.ExceptionPair>} exceptionList
125 * @return {!Object} 125 * @return {!Object}
126 * @private 126 * @private
127 */ 127 */
128 createAutofillSection_: function(addresses, creditCards) { 128 createAutofillSection_: function(addresses, creditCards) {
129 // Override the AutofillManagerImpl for testing.
130 this.autofillManager = new TestAutofillManager();
131 this.autofillManager.data.addresses = addresses;
132 this.autofillManager.data.creditCards = creditCards;
133 AutofillManagerImpl.instance_ = this.autofillManager;
134
129 var section = document.createElement('settings-autofill-section'); 135 var section = document.createElement('settings-autofill-section');
130 section.addresses = addresses;
131 section.creditCards = creditCards;
132 document.body.appendChild(section); 136 document.body.appendChild(section);
133 Polymer.dom.flush(); 137 Polymer.dom.flush();
134 return section; 138 return section;
135 }, 139 },
136 140
137 /** 141 /**
138 * Creates the Edit Address dialog and fulfills the promise when the dialog 142 * Creates the Edit Address dialog and fulfills the promise when the dialog
139 * has actually opened. 143 * has actually opened.
140 * @param {!chrome.autofillPrivate.AddressEntry} address 144 * @param {!chrome.autofillPrivate.AddressEntry} address
141 * @return {!Promise<Object>} 145 * @return {!Promise<Object>}
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 assertEquals(city, cols[0].value); 900 assertEquals(city, cols[0].value);
897 assertEquals(state, cols[1].value); 901 assertEquals(state, cols[1].value);
898 assertEquals(zip, cols[2].value); 902 assertEquals(zip, cols[2].value);
899 }); 903 });
900 }); 904 });
901 }); 905 });
902 }); 906 });
903 907
904 mocha.run(); 908 mocha.run();
905 }); 909 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698