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 DownloadsBrowserTest() {} | 18 function DownloadsBrowserTest() {} |
19 | 19 |
20 DownloadsBrowserTest.prototype = { | 20 DownloadsBrowserTest.prototype = { |
21 __proto__: PolymerTest.prototype, | 21 __proto__: PolymerTest.prototype, |
22 | 22 |
23 /** @override */ | 23 /** @override */ |
24 browsePreload: 'chrome://downloads/manager.html', | 24 browsePreload: 'chrome://downloads/manager.html', |
25 | 25 |
26 /** @override */ | 26 /** @override */ |
27 commandLineSwitches: [{switchName: 'enable-md-downloads'}], | |
28 | |
29 /** @override */ | |
30 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ | 27 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ |
31 'layout_tests.js', | 28 'layout_tests.js', |
32 ]), | 29 ]), |
33 }; | 30 }; |
34 | 31 |
35 TEST_F('DownloadsBrowserTest', 'layoutTests', function() { | 32 TEST_F('DownloadsBrowserTest', 'layoutTests', function() { |
36 downloads.layout_tests.registerTests(); | 33 downloads.layout_tests.registerTests(); |
37 mocha.run(); | 34 mocha.run(); |
38 }); | 35 }); |
OLD | NEW |