| 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 Chromium Polymer elements 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 Chromium Polymer elements. | 15 * Test fixture for Polymer Settings elements. |
| 16 * @constructor | 16 * @constructor |
| 17 * @extends {PolymerTest} | 17 * @extends {PolymerTest} |
| 18 */ | 18 */ |
| 19 function CrElementsBrowserTest() {} | 19 function CrSettingsBrowserTest() {} |
| 20 | 20 |
| 21 CrElementsBrowserTest.prototype = { | 21 CrSettingsBrowserTest.prototype = { |
| 22 __proto__: PolymerTest.prototype, | 22 __proto__: PolymerTest.prototype, |
| 23 | 23 |
| 24 // List tests for individual elements. | 24 /** @override */ |
| 25 browsePreload: 'chrome://md-settings/prefs/prefs.html', |
| 26 |
| 27 commandLineSwitches: [{switchName: 'enable-md-settings'}], |
| 28 |
| 29 /** @override */ |
| 25 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ | 30 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ |
| 26 'cr_checkbox_tests.js', | 31 'prefs_tests.js', |
| 27 ]), | 32 ]), |
| 28 }; | 33 }; |
| 29 | 34 |
| 30 // Runs all tests. | 35 // Runs all tests. |
| 31 TEST_F('CrElementsBrowserTest', 'CrElementsTest', function() { | 36 TEST_F('CrSettingsBrowserTest', 'CrSettingsTest', function() { |
| 32 // Register mocha tests for each element. | 37 // Register mocha tests for each element. |
| 33 cr_checkbox.registerTests(); | 38 cr_settings_prefs.registerTests(); |
| 34 | 39 |
| 35 // Run all registered tests. | 40 // Run all registered tests. |
| 36 mocha.run(); | 41 mocha.run(); |
| 37 }); | 42 }); |
| OLD | NEW |