| 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 Tests for the Material Design downloads page. */ | 5 /** @fileoverview Tests for the Material Design downloads page. */ |
| 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 * @constructor | 15 * @constructor |
| 16 * @extends {PolymerTest} | 16 * @extends {PolymerTest} |
| 17 */ | 17 */ |
| 18 function DownloadsTest() {} |
| 19 |
| 20 DownloadsTest.prototype = { |
| 21 __proto__: PolymerTest.prototype, |
| 22 |
| 23 /** @override */ |
| 24 setUp: function() { |
| 25 PolymerTest.prototype.setUp.call(this); |
| 26 this.accessibilityAuditConfig.ignoreSelectors('humanLangMissing', 'html'); |
| 27 }, |
| 28 }; |
| 29 |
| 30 /** |
| 31 * @constructor |
| 32 * @extends {DownloadsTest} |
| 33 */ |
| 18 function DownloadsItemTest() {} | 34 function DownloadsItemTest() {} |
| 19 | 35 |
| 20 DownloadsItemTest.prototype = { | 36 DownloadsItemTest.prototype = { |
| 21 __proto__: PolymerTest.prototype, | 37 __proto__: DownloadsTest.prototype, |
| 22 | 38 |
| 23 /** @override */ | 39 /** @override */ |
| 24 browsePreload: 'chrome://downloads/item.html', | 40 browsePreload: 'chrome://downloads/item.html', |
| 25 | 41 |
| 26 /** @override */ | 42 /** @override */ |
| 27 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ | 43 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ |
| 28 'item_tests.js', | 44 'item_tests.js', |
| 29 ]), | 45 ]), |
| 30 }; | 46 }; |
| 31 | 47 |
| 32 TEST_F('DownloadsItemTest', 'All', function() { | 48 TEST_F('DownloadsItemTest', 'All', function() { |
| 33 mocha.run(); | 49 mocha.run(); |
| 34 }); | 50 }); |
| 35 | 51 |
| 36 | |
| 37 /** | 52 /** |
| 38 * @constructor | 53 * @constructor |
| 39 * @extends {PolymerTest} | 54 * @extends {DownloadsTest} |
| 40 */ | 55 */ |
| 41 function DownloadsLayoutTest() {} | 56 function DownloadsLayoutTest() {} |
| 42 | 57 |
| 43 DownloadsLayoutTest.prototype = { | 58 DownloadsLayoutTest.prototype = { |
| 44 __proto__: PolymerTest.prototype, | 59 __proto__: DownloadsTest.prototype, |
| 45 | 60 |
| 46 /** @override */ | 61 /** @override */ |
| 47 browsePreload: 'chrome://downloads/manager.html', | 62 browsePreload: 'chrome://downloads/', |
| 48 | 63 |
| 49 /** @override */ | 64 /** @override */ |
| 50 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ | 65 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ |
| 51 'layout_tests.js', | 66 'layout_tests.js', |
| 52 ]), | 67 ]), |
| 53 }; | 68 }; |
| 54 | 69 |
| 55 TEST_F('DownloadsLayoutTest', 'All', function() { | 70 TEST_F('DownloadsLayoutTest', 'All', function() { |
| 56 mocha.run(); | 71 mocha.run(); |
| 57 }); | 72 }); |
| 58 | 73 |
| 59 /** | 74 /** |
| 60 * @constructor | 75 * @constructor |
| 61 * @extends {PolymerTest} | 76 * @extends {DownloadsTest} |
| 62 */ | 77 */ |
| 63 function DownloadsToolbarTest() {} | 78 function DownloadsToolbarTest() {} |
| 64 | 79 |
| 65 DownloadsToolbarTest.prototype = { | 80 DownloadsToolbarTest.prototype = { |
| 66 __proto__: PolymerTest.prototype, | 81 __proto__: DownloadsTest.prototype, |
| 67 | 82 |
| 68 /** @override */ | 83 /** @override */ |
| 69 browsePreload: 'chrome://downloads/toolbar.html', | 84 browsePreload: 'chrome://downloads/toolbar.html', |
| 70 | 85 |
| 71 /** @override */ | 86 /** @override */ |
| 72 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ | 87 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ |
| 73 'toolbar_tests.js', | 88 'toolbar_tests.js', |
| 74 ]), | 89 ]), |
| 75 }; | 90 }; |
| 76 | 91 |
| 77 TEST_F('DownloadsToolbarTest', 'All', function() { | 92 TEST_F('DownloadsToolbarTest', 'All', function() { |
| 78 mocha.run(); | 93 mocha.run(); |
| 79 }); | 94 }); |
| OLD | NEW |