| 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 Tests for shared Polymer elements. */ | 5 /** @fileoverview Tests for shared Polymer elements. */ |
| 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. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 /** @override */ | 32 /** @override */ |
| 33 setUp: function() { | 33 setUp: function() { |
| 34 PolymerTest.prototype.setUp.call(this); | 34 PolymerTest.prototype.setUp.call(this); |
| 35 // We aren't loading the main document. | 35 // We aren't loading the main document. |
| 36 this.accessibilityAuditConfig.ignoreSelectors('humanLangMissing', 'html'); | 36 this.accessibilityAuditConfig.ignoreSelectors('humanLangMissing', 'html'); |
| 37 }, | 37 }, |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 function CrElementsLazyRenderTest() {} | 40 function CrElementsLazyRenderTest() {} |
| 41 | 41 |
| 42 /** |
| 43 * @constructor |
| 44 * @extends {CrElementsBrowserTest} |
| 45 */ |
| 42 CrElementsLazyRenderTest.prototype = { | 46 CrElementsLazyRenderTest.prototype = { |
| 43 __proto__: CrElementsBrowserTest.prototype, | 47 __proto__: CrElementsBrowserTest.prototype, |
| 44 | 48 |
| 45 /** @override */ | 49 /** @override */ |
| 46 browsePreload: | 50 browsePreload: |
| 47 'chrome://resources/cr_elements/cr_lazy_render/cr_lazy_render.html', | 51 'chrome://resources/cr_elements/cr_lazy_render/cr_lazy_render.html', |
| 48 | 52 |
| 49 /** @override */ | 53 /** @override */ |
| 50 extraLibraries: CrElementsBrowserTest.prototype.extraLibraries.concat([ | 54 extraLibraries: CrElementsBrowserTest.prototype.extraLibraries.concat([ |
| 51 'cr_lazy_render_tests.js' | 55 'cr_lazy_render_tests.js' |
| 52 ]), | 56 ]), |
| 53 }; | 57 }; |
| 54 | 58 |
| 55 TEST_F('CrElementsLazyRenderTest', 'All', function() { | 59 TEST_F('CrElementsLazyRenderTest', 'All', function() { |
| 56 mocha.run(); | 60 mocha.run(); |
| 57 }); | 61 }); |
| 58 | 62 |
| 63 /** |
| 64 * @constructor |
| 65 * @extends {CrElementsBrowserTest} |
| 66 */ |
| 59 function CrElementsProfileAvatarSelectorTest() {} | 67 function CrElementsProfileAvatarSelectorTest() {} |
| 60 | 68 |
| 61 CrElementsProfileAvatarSelectorTest.prototype = { | 69 CrElementsProfileAvatarSelectorTest.prototype = { |
| 62 __proto__: CrElementsBrowserTest.prototype, | 70 __proto__: CrElementsBrowserTest.prototype, |
| 63 | 71 |
| 64 /** @override */ | 72 /** @override */ |
| 65 browsePreload: | 73 browsePreload: |
| 66 'chrome://resources/cr_elements/cr_profile_avatar_selector/' + | 74 'chrome://resources/cr_elements/cr_profile_avatar_selector/' + |
| 67 'cr_profile_avatar_selector.html', | 75 'cr_profile_avatar_selector.html', |
| 68 | 76 |
| 69 /** @override */ | 77 /** @override */ |
| 70 extraLibraries: CrElementsBrowserTest.prototype.extraLibraries.concat([ | 78 extraLibraries: CrElementsBrowserTest.prototype.extraLibraries.concat([ |
| 71 'cr_profile_avatar_selector_tests.js', | 79 'cr_profile_avatar_selector_tests.js', |
| 72 ]), | 80 ]), |
| 73 }; | 81 }; |
| 74 | 82 |
| 75 TEST_F('CrElementsProfileAvatarSelectorTest', 'All', function() { | 83 TEST_F('CrElementsProfileAvatarSelectorTest', 'All', function() { |
| 76 cr_profile_avatar_selector.registerTests(); | 84 cr_profile_avatar_selector.registerTests(); |
| 77 mocha.grep(cr_profile_avatar_selector.TestNames.Basic).run(); | 85 mocha.grep(cr_profile_avatar_selector.TestNames.Basic).run(); |
| 78 }); | 86 }); |
| 79 | 87 |
| 88 /** |
| 89 * @constructor |
| 90 * @extends {CrElementsBrowserTest} |
| 91 */ |
| 80 function CrElementsToolbarSearchFieldTest() {} | 92 function CrElementsToolbarSearchFieldTest() {} |
| 81 | 93 |
| 82 CrElementsToolbarSearchFieldTest.prototype = { | 94 CrElementsToolbarSearchFieldTest.prototype = { |
| 83 __proto__: CrElementsBrowserTest.prototype, | 95 __proto__: CrElementsBrowserTest.prototype, |
| 84 | 96 |
| 85 /** @override */ | 97 /** @override */ |
| 86 browsePreload: | 98 browsePreload: |
| 87 'chrome://resources/cr_elements/cr_toolbar/cr_toolbar_search_field.html', | 99 'chrome://resources/cr_elements/cr_toolbar/cr_toolbar_search_field.html', |
| 88 | 100 |
| 89 /** @override */ | 101 /** @override */ |
| 90 extraLibraries: CrElementsBrowserTest.prototype.extraLibraries.concat([ | 102 extraLibraries: CrElementsBrowserTest.prototype.extraLibraries.concat([ |
| 91 'cr_toolbar_search_field_tests.js', | 103 'cr_toolbar_search_field_tests.js', |
| 92 ]), | 104 ]), |
| 93 }; | 105 }; |
| 94 | 106 |
| 95 TEST_F('CrElementsToolbarSearchFieldTest', 'All', function() { | 107 TEST_F('CrElementsToolbarSearchFieldTest', 'All', function() { |
| 96 cr_toolbar_search_field.registerTests(); | 108 cr_toolbar_search_field.registerTests(); |
| 97 mocha.run(); | 109 mocha.run(); |
| 98 }); | 110 }); |
| 99 | 111 |
| 112 /** |
| 113 * @constructor |
| 114 * @extends {CrElementsBrowserTest} |
| 115 */ |
| 100 function CrElementsSliderTest() {} | 116 function CrElementsSliderTest() {} |
| 101 | 117 |
| 102 CrElementsSliderTest.prototype = { | 118 CrElementsSliderTest.prototype = { |
| 103 __proto__: CrElementsBrowserTest.prototype, | 119 __proto__: CrElementsBrowserTest.prototype, |
| 104 | 120 |
| 105 /** @override */ | 121 /** @override */ |
| 106 browsePreload: 'chrome://resources/cr_elements/cr_slider/cr_slider.html', | 122 browsePreload: 'chrome://resources/cr_elements/cr_slider/cr_slider.html', |
| 107 | 123 |
| 108 /** @override */ | 124 /** @override */ |
| 109 extraLibraries: CrElementsBrowserTest.prototype.extraLibraries.concat([ | 125 extraLibraries: CrElementsBrowserTest.prototype.extraLibraries.concat([ |
| 110 'cr_slider_tests.js', | 126 'cr_slider_tests.js', |
| 111 ]), | 127 ]), |
| 112 }; | 128 }; |
| 113 | 129 |
| 114 TEST_F('CrElementsSliderTest', 'All', function() { | 130 TEST_F('CrElementsSliderTest', 'All', function() { |
| 115 cr_slider.registerTests(); | 131 cr_slider.registerTests(); |
| 116 mocha.run(); | 132 mocha.run(); |
| 117 }); | 133 }); |
| 118 | 134 |
| 135 /** |
| 136 * @constructor |
| 137 * @extends {CrElementsBrowserTest} |
| 138 */ |
| 119 function CrElementsDrawerTest() {} | 139 function CrElementsDrawerTest() {} |
| 120 | 140 |
| 121 CrElementsDrawerTest.prototype = { | 141 CrElementsDrawerTest.prototype = { |
| 122 __proto__: CrElementsBrowserTest.prototype, | 142 __proto__: CrElementsBrowserTest.prototype, |
| 123 | 143 |
| 124 /** @override */ | 144 /** @override */ |
| 125 browsePreload: 'chrome://resources/cr_elements/cr_drawer/cr_drawer.html', | 145 browsePreload: 'chrome://resources/cr_elements/cr_drawer/cr_drawer.html', |
| 126 | 146 |
| 127 /** @override */ | 147 /** @override */ |
| 128 extraLibraries: CrElementsBrowserTest.prototype.extraLibraries.concat( | 148 extraLibraries: CrElementsBrowserTest.prototype.extraLibraries.concat( |
| 129 ['cr_drawer_tests.js', ROOT_PATH + 'ui/webui/resources/js/util.js']), | 149 ['cr_drawer_tests.js', ROOT_PATH + 'ui/webui/resources/js/util.js']), |
| 130 }; | 150 }; |
| 131 | 151 |
| 132 TEST_F('CrElementsDrawerTest', 'All', function() { | 152 TEST_F('CrElementsDrawerTest', 'All', function() { |
| 133 mocha.run(); | 153 mocha.run(); |
| 134 }); | 154 }); |
| 155 |
| 156 /** |
| 157 * @constructor |
| 158 * @extends {CrElementsBrowserTest} |
| 159 */ |
| 160 function CrElementsScrollableBehaviorTest() {} |
| 161 |
| 162 CrElementsScrollableBehaviorTest.prototype = { |
| 163 __proto__: CrElementsBrowserTest.prototype, |
| 164 |
| 165 /** @override */ |
| 166 browsePreload: 'chrome://resources/cr_elements/cr_scrollable_behavior.html', |
| 167 |
| 168 /** @override */ |
| 169 extraLibraries: CrElementsBrowserTest.prototype.extraLibraries.concat([ |
| 170 'cr_scrollable_behavior_tests.js', |
| 171 ]), |
| 172 }; |
| 173 |
| 174 TEST_F('CrElementsScrollableBehaviorTest', 'All', function() { |
| 175 mocha.run(); |
| 176 }); |
| OLD | NEW |