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

Side by Side Diff: chrome/test/data/webui/settings/settings_passwords_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
« no previous file with comments | « chrome/test/data/webui/settings/settings_autofill_section_browsertest.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 Password Settings tests. */ 5 /** @fileoverview Runs the Polymer Password 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 /** @type {TestPasswordManager} */ 174 /** @type {TestPasswordManager} */
175 var passwordManager = null; 175 var passwordManager = null;
176 176
177 setup(function() { 177 setup(function() {
178 PolymerTest.clearBody(); 178 PolymerTest.clearBody();
179 // Override the PasswordManagerImpl for testing. 179 // Override the PasswordManagerImpl for testing.
180 passwordManager = new TestPasswordManager(); 180 passwordManager = new TestPasswordManager();
181 PasswordManagerImpl.instance_ = passwordManager; 181 PasswordManagerImpl.instance_ = passwordManager;
182 }); 182 });
183 183
184 test('testPasswordsExtensionIndicator', function() {
185 // Initialize with dummy prefs.
186 var element = document.createElement('passwords-section');
187 element.prefs = {credentials_enable_service: {}};
188 document.body.appendChild(element);
189
190 assertFalse(!!element.$$('#passwordsExtensionIndicator'));
191 element.set('prefs.credentials_enable_service.extensionId', 'test-id');
192 Polymer.dom.flush();
193
194 assertTrue(!!element.$$('#passwordsExtensionIndicator'));
195 });
196
184 test('verifyNoSavedPasswords', function() { 197 test('verifyNoSavedPasswords', function() {
185 var passwordsSection = createPasswordsSection(passwordManager, [], []); 198 var passwordsSection = createPasswordsSection(passwordManager, [], []);
186 199
187 validatePasswordList(passwordsSection.$.passwordList, []); 200 validatePasswordList(passwordsSection.$.passwordList, []);
188 201
189 assertFalse(passwordsSection.$.noPasswordsLabel.hidden); 202 assertFalse(passwordsSection.$.noPasswordsLabel.hidden);
190 assertTrue(passwordsSection.$.savedPasswordsHeading.hidden); 203 assertTrue(passwordsSection.$.savedPasswordsHeading.hidden);
191 }); 204 });
192 205
193 test('verifySavedPasswordLength', function() { 206 test('verifySavedPasswordLength', function() {
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 assertEquals(item.loginPair.username, event.detail.username); 469 assertEquals(item.loginPair.username, event.detail.username);
457 done(); 470 done();
458 }); 471 });
459 472
460 MockInteractions.tap(passwordDialog.$.showPasswordButton); 473 MockInteractions.tap(passwordDialog.$.showPasswordButton);
461 }); 474 });
462 }); 475 });
463 476
464 mocha.run(); 477 mocha.run();
465 }); 478 });
OLDNEW
« no previous file with comments | « chrome/test/data/webui/settings/settings_autofill_section_browsertest.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698