Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Side by Side Diff: chrome/test/data/webui/settings/cr_settings_browsertest.js

Issue 2050053002: MD Settings: split browser tests per-file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@settings-tests
Patch Set: nits Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 browsePreload: 'chrome://md-settings/prefs/prefs.html', 25 browsePreload: 'chrome://md-settings/prefs/prefs.html',
26 26
27 /** 27 /** @override */
28 * TODO(dbeam): these should not be required monolithically.
29 * @override
30 */
31 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ 28 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([
32 '../fake_chrome_event.js', 29 '../fake_chrome_event.js',
33 'fake_settings_private.js', 30 'fake_settings_private.js',
dpapad 2016/06/13 18:19:46 Are those two files needed by the majority of CrSe
34 'checkbox_tests.js',
35 'dropdown_menu_tests.js',
36 'pref_util_tests.js',
37 'prefs_test_cases.js',
38 'prefs_tests.js',
39 ]), 31 ]),
40 32
41 /** @override */ 33 /** @override */
42 setUp: function() { 34 setUp: function() {
43 PolymerTest.prototype.setUp.call(this); 35 PolymerTest.prototype.setUp.call(this);
44 // We aren't loading the main document. 36 // We aren't loading the main document.
45 this.accessibilityAuditConfig.ignoreSelectors('humanLangMissing', 'html'); 37 this.accessibilityAuditConfig.ignoreSelectors('humanLangMissing', 'html');
46 38
47 // TODO(michaelpg): Re-enable after bringing in fix for 39 // TODO(michaelpg): Re-enable after bringing in fix for
48 // https://github.com/PolymerElements/paper-slider/issues/131. 40 // https://github.com/PolymerElements/paper-slider/issues/131.
49 this.accessibilityAuditConfig.ignoreSelectors( 41 this.accessibilityAuditConfig.ignoreSelectors(
50 'badAriaAttributeValue', 'paper-slider'); 42 'badAriaAttributeValue', 'paper-slider');
51 }, 43 },
52 }; 44 };
53 45
54 // Have to include command_line.h manually due to GEN calls below. 46 // Have to include command_line.h manually due to GEN calls below.
55 GEN('#include "base/command_line.h"'); 47 GEN('#include "base/command_line.h"');
56 48
57 TEST_F('CrSettingsBrowserTest', 'Checkbox', function() { 49 function CrSettingsCheckboxTest() {}
50
51 CrSettingsCheckboxTest.prototype = {
52 __proto__: CrSettingsBrowserTest.prototype,
53
54 /** @override */
55 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
56 'checkbox_tests.js',
57 ]),
58 };
59
60 TEST_F('CrSettingsCheckboxTest', 'All', function() {
58 settings_checkbox.registerTests(); 61 settings_checkbox.registerTests();
59 mocha.run(); 62 mocha.run();
60 }); 63 });
61 64
62 TEST_F('CrSettingsBrowserTest', 'DropdownMenu', function() { 65 function CrSettingsDropdownMenuTest() {}
66
67 CrSettingsDropdownMenuTest.prototype = {
68 __proto__: CrSettingsBrowserTest.prototype,
69
dpapad 2016/06/13 18:19:46 Since we split this to a separate C++ test fixture
michaelpg 2016/06/14 00:30:21 can't remember why i didn't just import i18n_setup
70 /** @override */
71 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
72 'dropdown_menu_tests.js',
73 ]),
74 };
75
76 TEST_F('CrSettingsDropdownMenuTest', 'All', function() {
63 settings_dropdown_menu.registerTests(); 77 settings_dropdown_menu.registerTests();
64 mocha.run(); 78 mocha.run();
65 }); 79 });
66 80
67 TEST_F('CrSettingsBrowserTest', 'PrefUtil', function() { 81 function CrSettingsPrefUtilTest() {}
82
83 CrSettingsPrefUtilTest.prototype = {
84 __proto__: CrSettingsBrowserTest.prototype,
85
dpapad 2016/06/13 18:19:46 Since we split this to a separate C++ test fixture
86 /** @override */
87 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
88 'pref_util_tests.js',
89 ]),
90 };
91
92 TEST_F('CrSettingsPrefUtilTest', 'All', function() {
68 settings_prefUtil.registerTests(); 93 settings_prefUtil.registerTests();
69 mocha.run(); 94 mocha.run();
70 }); 95 });
71 96
72 TEST_F('CrSettingsBrowserTest', 'Prefs', function() { 97 function CrSettingsPrefsTest() {}
98
99 CrSettingsPrefsTest.prototype = {
100 __proto__: CrSettingsBrowserTest.prototype,
101
102 /** @override */
103 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
104 'prefs_test_cases.js',
105 'prefs_tests.js',
106 ]),
107 };
108
109 TEST_F('CrSettingsPrefsTest', 'All', function() {
73 settings_prefs.registerTests(); 110 settings_prefs.registerTests();
74 mocha.run(); 111 mocha.run();
75 }); 112 });
76 113
77 /** 114 /**
78 * @constructor 115 * @constructor
79 * @extends {CrSettingsBrowserTest} 116 * @extends {CrSettingsBrowserTest}
80 */ 117 */
81 function CrSettingsAboutPageTest() {} 118 function CrSettingsAboutPageTest() {}
82 119
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ 588 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
552 'fake_language_settings_private.js', 589 'fake_language_settings_private.js',
553 'fake_settings_private.js', 590 'fake_settings_private.js',
554 'languages_page_tests.js', 591 'languages_page_tests.js',
555 ]), 592 ]),
556 }; 593 };
557 594
558 TEST_F('CrSettingsLanguagesPageTest', 'LanguagesPage', function() { 595 TEST_F('CrSettingsLanguagesPageTest', 'LanguagesPage', function() {
559 mocha.run(); 596 mocha.run();
560 }); 597 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698