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 Settings tests. */ | 5 /** @fileoverview Runs the Polymer Settings tests. */ |
6 | 6 |
7 /** @const {string} Path to source root. */ | 7 /** @const {string} Path to source root. */ |
8 var ROOT_PATH = '../../../../../'; | 8 var ROOT_PATH = '../../../../../'; |
9 | 9 |
10 // Polymer BrowserTest fixture. | 10 // Polymer BrowserTest fixture. |
11 GEN_INCLUDE( | 11 GEN_INCLUDE( |
12 [ROOT_PATH + 'chrome/test/data/webui/polymer_browser_test_base.js']); | 12 [ROOT_PATH + 'chrome/test/data/webui/polymer_browser_test_base.js']); |
13 | 13 |
14 /** | 14 /** |
15 * Test fixture for Polymer Settings elements. | 15 * Test fixture for Polymer Settings elements. |
16 * @constructor | 16 * @constructor |
17 * @extends {PolymerTest} | 17 * @extends {PolymerTest} |
18 */ | 18 */ |
19 function CrSettingsBrowserTest() {} | 19 function CrSettingsBrowserTest() {} |
20 | 20 |
21 CrSettingsBrowserTest.prototype = { | 21 CrSettingsBrowserTest.prototype = { |
22 __proto__: PolymerTest.prototype, | 22 __proto__: PolymerTest.prototype, |
23 | 23 |
24 /** @override */ | 24 /** @override */ |
25 get browsePreload() { | 25 get browsePreload() { |
26 throw 'this is abstract and should be overriden by subclasses'; | 26 throw 'this is abstract and should be overriden by subclasses'; |
27 }, | 27 }, |
28 | 28 |
29 /** @override */ | 29 /** @override */ |
30 extraLibraries: PolymerTest.getLibraries(ROOT_PATH), | 30 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ |
| 31 'ensure_lazy_loaded.js', |
| 32 ]), |
31 | 33 |
32 /** @override */ | 34 /** @override */ |
33 setUp: function() { | 35 setUp: function() { |
34 PolymerTest.prototype.setUp.call(this); | 36 PolymerTest.prototype.setUp.call(this); |
35 // We aren't loading the main document. | 37 // We aren't loading the main document. |
36 this.accessibilityAuditConfig.ignoreSelectors('humanLangMissing', 'html'); | 38 this.accessibilityAuditConfig.ignoreSelectors('humanLangMissing', 'html'); |
37 | 39 |
38 // TODO(michaelpg): Re-enable after bringing in fix for | 40 // TODO(michaelpg): Re-enable after bringing in fix for |
39 // https://github.com/PolymerElements/paper-slider/issues/131. | 41 // https://github.com/PolymerElements/paper-slider/issues/131. |
40 this.accessibilityAuditConfig.ignoreSelectors( | 42 this.accessibilityAuditConfig.ignoreSelectors( |
41 'badAriaAttributeValue', 'paper-slider'); | 43 'badAriaAttributeValue', 'paper-slider'); |
| 44 |
| 45 settings.ensureLazyLoaded(); |
42 }, | 46 }, |
43 }; | 47 }; |
44 | 48 |
45 // Have to include command_line.h manually due to GEN calls below. | 49 // Have to include command_line.h manually due to GEN calls below. |
46 GEN('#include "base/command_line.h"'); | 50 GEN('#include "base/command_line.h"'); |
47 | 51 |
48 function CrSettingsCheckboxTest() {} | 52 function CrSettingsCheckboxTest() {} |
49 | 53 |
50 CrSettingsCheckboxTest.prototype = { | 54 CrSettingsCheckboxTest.prototype = { |
51 __proto__: CrSettingsBrowserTest.prototype, | 55 __proto__: CrSettingsBrowserTest.prototype, |
(...skipping 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1436 | 1440 |
1437 /** @override */ | 1441 /** @override */ |
1438 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ | 1442 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ |
1439 'focusable_iron_list_item_behavior_test.js', | 1443 'focusable_iron_list_item_behavior_test.js', |
1440 ]), | 1444 ]), |
1441 }; | 1445 }; |
1442 | 1446 |
1443 TEST_F('CrSettingsFocusableIronListItemBehavior', 'FocusTest', function() { | 1447 TEST_F('CrSettingsFocusableIronListItemBehavior', 'FocusTest', function() { |
1444 mocha.run(); | 1448 mocha.run(); |
1445 }); | 1449 }); |
OLD | NEW |