| OLD | NEW |
| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 * @param {!Array<!chrome.passwordsPrivate.PasswordUiEntry>} passwordList | 103 * @param {!Array<!chrome.passwordsPrivate.PasswordUiEntry>} passwordList |
| 104 * @param {!Array<!chrome.passwordsPrivate.ExceptionPair>} exceptionList | 104 * @param {!Array<!chrome.passwordsPrivate.ExceptionPair>} exceptionList |
| 105 * @return {!Object} | 105 * @return {!Object} |
| 106 * @private | 106 * @private |
| 107 */ | 107 */ |
| 108 createPasswordsSection_: function(passwordList, exceptionList) { | 108 createPasswordsSection_: function(passwordList, exceptionList) { |
| 109 // Create a passwords-section to use for testing. | 109 // Create a passwords-section to use for testing. |
| 110 var passwordsSection = document.createElement('passwords-section'); | 110 var passwordsSection = document.createElement('passwords-section'); |
| 111 passwordsSection.savedPasswords = passwordList; | 111 passwordsSection.savedPasswords = passwordList; |
| 112 passwordsSection.passwordExceptions = exceptionList; | 112 passwordsSection.passwordExceptions = exceptionList; |
| 113 passwordsSection.scrollTarget = passwordsSection; |
| 113 document.body.appendChild(passwordsSection); | 114 document.body.appendChild(passwordsSection); |
| 114 this.flushPasswordSection_(passwordsSection); | 115 this.flushPasswordSection_(passwordsSection); |
| 115 return passwordsSection; | 116 return passwordsSection; |
| 116 }, | 117 }, |
| 117 | 118 |
| 118 /** | 119 /** |
| 119 * Helper method used to create a password editing dialog. | 120 * Helper method used to create a password editing dialog. |
| 120 * @param {!chrome.passwordsPrivate.PasswordUiEntry} passwordItem | 121 * @param {!chrome.passwordsPrivate.PasswordUiEntry} passwordItem |
| 121 * @return {!Object} | 122 * @return {!Object} |
| 122 * @private | 123 * @private |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 assertEquals(item.loginPair.username, event.detail.username); | 443 assertEquals(item.loginPair.username, event.detail.username); |
| 443 done(); | 444 done(); |
| 444 }); | 445 }); |
| 445 | 446 |
| 446 MockInteractions.tap(passwordDialog.$.showPasswordButton); | 447 MockInteractions.tap(passwordDialog.$.showPasswordButton); |
| 447 }); | 448 }); |
| 448 }); | 449 }); |
| 449 | 450 |
| 450 mocha.run(); | 451 mocha.run(); |
| 451 }); | 452 }); |
| OLD | NEW |