| OLD | NEW |
| 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 Passwords and Forms tests. */ | 5 /** @fileoverview Runs the Polymer Passwords and Forms 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 14 matching lines...) Expand all Loading... |
| 25 __proto__: PolymerTest.prototype, | 25 __proto__: PolymerTest.prototype, |
| 26 | 26 |
| 27 /** @override */ | 27 /** @override */ |
| 28 browsePreload: 'chrome://md-settings/passwords_and_forms_page/' + | 28 browsePreload: 'chrome://md-settings/passwords_and_forms_page/' + |
| 29 'passwords_and_forms_page.html', | 29 'passwords_and_forms_page.html', |
| 30 | 30 |
| 31 /** @override */ | 31 /** @override */ |
| 32 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ | 32 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ |
| 33 '../fake_chrome_event.js', | 33 '../fake_chrome_event.js', |
| 34 'fake_settings_private.js', | 34 'fake_settings_private.js', |
| 35 'ensure_lazy_loaded.js', |
| 35 ]), | 36 ]), |
| 36 | 37 |
| 37 /** @override */ | 38 /** @override */ |
| 38 setUp: function() { | 39 setUp: function() { |
| 39 PolymerTest.prototype.setUp.call(this); | 40 PolymerTest.prototype.setUp.call(this); |
| 40 | 41 |
| 41 // Test is run on an individual element that won't have a page language. | 42 // Test is run on an individual element that won't have a page language. |
| 42 this.accessibilityAuditConfig.auditRulesToIgnore.push('humanLangMissing'); | 43 this.accessibilityAuditConfig.auditRulesToIgnore.push('humanLangMissing'); |
| 44 |
| 45 settings.ensureLazyLoaded(); |
| 43 }, | 46 }, |
| 44 }; | 47 }; |
| 45 | 48 |
| 46 /** This test will validate that the section is loaded with data. */ | 49 /** This test will validate that the section is loaded with data. */ |
| 47 TEST_F('PasswordsAndFormsBrowserTest', 'uiTests', function() { | 50 TEST_F('PasswordsAndFormsBrowserTest', 'uiTests', function() { |
| 48 var passwordManager; | 51 var passwordManager; |
| 49 var autofillManager; | 52 var autofillManager; |
| 50 | 53 |
| 51 /** | 54 /** |
| 52 * Creates a new passwords and forms element. | 55 * Creates a new passwords and forms element. |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 Polymer.dom.flush(); | 278 Polymer.dom.flush(); |
| 276 | 279 |
| 277 assertTrue(!!element.$$('#passwordsExtensionIndicator')); | 280 assertTrue(!!element.$$('#passwordsExtensionIndicator')); |
| 278 destroyPrefs(prefs); | 281 destroyPrefs(prefs); |
| 279 }); | 282 }); |
| 280 }); | 283 }); |
| 281 }); | 284 }); |
| 282 | 285 |
| 283 mocha.run(); | 286 mocha.run(); |
| 284 }); | 287 }); |
| OLD | NEW |