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

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

Issue 2668163002: MD Settings: Fix styles in several places. (Closed)
Patch Set: remove ugly for-unit-test-only class 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
« no previous file with comments | « chrome/browser/resources/settings/site_settings/media_picker.html ('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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 85 }
86 }, 86 },
87 87
88 /** 88 /**
89 * Returns all children of an element that has children added by a dom-repeat. 89 * Returns all children of an element that has children added by a dom-repeat.
90 * @param {!Element} element 90 * @param {!Element} element
91 * @return {!Array<!Element>} 91 * @return {!Array<!Element>}
92 * @private 92 * @private
93 */ 93 */
94 getDomRepeatChildren_: function(element) { 94 getDomRepeatChildren_: function(element) {
95 var template = element.children[element.children.length - 1]; 95 var nodes = element.querySelectorAll('.list-item:not([id])');
96 assertEquals('TEMPLATE', template.tagName); 96 return nodes;
97 // The template is at the end of the list of children and should be skipped.
98 return Array.prototype.slice.call(element.children, 0, -1);
99 }, 97 },
100 98
101 /** 99 /**
102 * Helper method used to create a password section for the given lists. 100 * Helper method used to create a password section for the given lists.
103 * @param {!Array<!chrome.passwordsPrivate.PasswordUiEntry>} passwordList 101 * @param {!Array<!chrome.passwordsPrivate.PasswordUiEntry>} passwordList
104 * @param {!Array<!chrome.passwordsPrivate.ExceptionPair>} exceptionList 102 * @param {!Array<!chrome.passwordsPrivate.ExceptionPair>} exceptionList
105 * @return {!Object} 103 * @return {!Object}
106 * @private 104 * @private
107 */ 105 */
108 createPasswordsSection_: function(passwordList, exceptionList) { 106 createPasswordsSection_: function(passwordList, exceptionList) {
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 assertEquals(item.loginPair.username, event.detail.username); 440 assertEquals(item.loginPair.username, event.detail.username);
443 done(); 441 done();
444 }); 442 });
445 443
446 MockInteractions.tap(passwordDialog.$.showPasswordButton); 444 MockInteractions.tap(passwordDialog.$.showPasswordButton);
447 }); 445 });
448 }); 446 });
449 447
450 mocha.run(); 448 mocha.run();
451 }); 449 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/site_settings/media_picker.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698