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

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

Issue 2762433002: MD Settings: move autofill and manage password toggles to their subpages. (Closed)
Patch Set: use this.i18n instead Created 3 years, 9 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 */ 163 */
164 createCreditCardDialog_: function(creditCardItem) { 164 createCreditCardDialog_: function(creditCardItem) {
165 var section = document.createElement('settings-credit-card-edit-dialog'); 165 var section = document.createElement('settings-credit-card-edit-dialog');
166 section.creditCard = creditCardItem; 166 section.creditCard = creditCardItem;
167 document.body.appendChild(section); 167 document.body.appendChild(section);
168 Polymer.dom.flush(); 168 Polymer.dom.flush();
169 return section; 169 return section;
170 }, 170 },
171 }; 171 };
172 172
173 TEST_F('SettingsAutofillSectionBrowserTest', 'uiTest', function() {
174 suite('AutofillSection', function() {
175 test('testAutofillExtensionIndicator', function() {
176 // Initializing with fake prefs
177 var section = document.createElement('settings-autofill-section');
178 section.prefs = {autofill: {enabled: {}}};
179 document.body.appendChild(section);
180
181 assertFalse(!!section.$$('#autofillExtensionIndicator'));
182 section.set('prefs.autofill.enabled.extensionId', 'test-id');
183 Polymer.dom.flush();
184
185 assertTrue(!!section.$$('#autofillExtensionIndicator'));
186 });
187 });
188
189 mocha.run();
190 });
191
173 TEST_F('SettingsAutofillSectionBrowserTest', 'CreditCardTests', function() { 192 TEST_F('SettingsAutofillSectionBrowserTest', 'CreditCardTests', function() {
174 var self = this; 193 var self = this;
175 194
176 setup(function() { 195 setup(function() {
177 PolymerTest.clearBody(); 196 PolymerTest.clearBody();
178 }); 197 });
179 198
180 suite('AutofillSection', function() { 199 suite('AutofillSection', function() {
181 test('verifyCreditCardCount', function() { 200 test('verifyCreditCardCount', function() {
182 var section = self.createAutofillSection_([], []); 201 var section = self.createAutofillSection_([], []);
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 assertEquals(city, cols[0].value); 938 assertEquals(city, cols[0].value);
920 assertEquals(state, cols[1].value); 939 assertEquals(state, cols[1].value);
921 assertEquals(zip, cols[2].value); 940 assertEquals(zip, cols[2].value);
922 }); 941 });
923 }); 942 });
924 }); 943 });
925 }); 944 });
926 945
927 mocha.run(); 946 mocha.run();
928 }); 947 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698