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

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

Issue 1853413002: MD Settings: Convert reset_page/ to use browser proxy pattern. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments. Created 4 years, 8 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
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.
(...skipping 18 matching lines...) Expand all
29 * @override 29 * @override
30 */ 30 */
31 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ 31 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([
32 '../fake_chrome_event.js', 32 '../fake_chrome_event.js',
33 'fake_settings_private.js', 33 'fake_settings_private.js',
34 'checkbox_tests.js', 34 'checkbox_tests.js',
35 'dropdown_menu_tests.js', 35 'dropdown_menu_tests.js',
36 'pref_util_tests.js', 36 'pref_util_tests.js',
37 'prefs_test_cases.js', 37 'prefs_test_cases.js',
38 'prefs_tests.js', 38 'prefs_tests.js',
39 'reset_page_test.js',
40 ]), 39 ]),
41 40
42 /** @override */ 41 /** @override */
43 setUp: function() { 42 setUp: function() {
44 PolymerTest.prototype.setUp.call(this); 43 PolymerTest.prototype.setUp.call(this);
45 // We aren't loading the main document. 44 // We aren't loading the main document.
46 this.accessibilityAuditConfig.ignoreSelectors('humanLangMissing', 'html'); 45 this.accessibilityAuditConfig.ignoreSelectors('humanLangMissing', 'html');
47 }, 46 },
48 }; 47 };
49 48
(...skipping 11 matching lines...) Expand all
61 TEST_F('CrSettingsBrowserTest', 'MAYBE_CrSettingsTest', function() { 60 TEST_F('CrSettingsBrowserTest', 'MAYBE_CrSettingsTest', function() {
62 settings_checkbox.registerTests(); 61 settings_checkbox.registerTests();
63 settings_dropdown_menu.registerTests(); 62 settings_dropdown_menu.registerTests();
64 settings_prefUtil.registerTests(); 63 settings_prefUtil.registerTests();
65 settings_prefs.registerTests(); 64 settings_prefs.registerTests();
66 65
67 // Run all registered tests. 66 // Run all registered tests.
68 mocha.run(); 67 mocha.run();
69 }); 68 });
70 69
71 TEST_F('CrSettingsBrowserTest', 'ResetPage', function() {
72 settings_reset_page.registerTests();
73 mocha.run();
74 });
75
76 /** 70 /**
77 * @constructor 71 * @constructor
78 * @extends {CrSettingsBrowserTest} 72 * @extends {CrSettingsBrowserTest}
79 */ 73 */
80 function CrSettingsRtlTest() {} 74 function CrSettingsRtlTest() {}
81 75
82 CrSettingsRtlTest.prototype = { 76 CrSettingsRtlTest.prototype = {
83 __proto__: CrSettingsBrowserTest.prototype, 77 __proto__: CrSettingsBrowserTest.prototype,
84 78
85 /** @override */ 79 /** @override */
86 browsePreload: 'chrome://md-settings/settings_ui/settings_ui.html', 80 browsePreload: 'chrome://md-settings/settings_ui/settings_ui.html',
87 81
88 /** @override */ 82 /** @override */
89 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ 83 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
90 'rtl_tests.js', 84 'rtl_tests.js',
91 ]), 85 ]),
92 }; 86 };
93 87
94 TEST_F('CrSettingsRtlTest', 'DrawerPanelFlips', function() { 88 TEST_F('CrSettingsRtlTest', 'DrawerPanelFlips', function() {
95 settingsHidePagesByDefaultForTest = true; 89 settingsHidePagesByDefaultForTest = true;
96 settings_rtl_tests.registerDrawerPanelTests(); 90 settings_rtl_tests.registerDrawerPanelTests();
97 mocha.run(); 91 mocha.run();
98 }); 92 });
99 93
94
95 /**
96 * Test fixture for chrome/browser/resources/settings/reset_page/.
97 * @constructor
98 * @extends {CrSettingsBrowserTest}
99 */
100 function CrSettingsResetPageTest() {}
101
102 CrSettingsResetPageTest.prototype = {
103 __proto__: CrSettingsBrowserTest.prototype,
104
105 /** @override */
106 browsePreload: 'chrome://md-settings/reset_page/reset_page.html',
107
108 /** @override */
109 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([
110 ROOT_PATH + 'ui/webui/resources/js/promise_resolver.js',
111 'test_browser_proxy.js',
112 'reset_page_test.js',
113 ]),
114 };
115
116 TEST_F('CrSettingsResetPageTest', 'ResetPage', function() {
117 settings_reset_page.registerTests();
118 mocha.run();
119 });
120
100 /** 121 /**
101 * Test fixture for chrome/browser/resources/settings/search_page/. 122 * Test fixture for chrome/browser/resources/settings/search_page/.
102 * @constructor 123 * @constructor
103 * @extends {CrSettingsBrowserTest} 124 * @extends {CrSettingsBrowserTest}
104 */ 125 */
105 function CrSettingsSearchPageTest() {} 126 function CrSettingsSearchPageTest() {}
106 127
107 CrSettingsSearchPageTest.prototype = { 128 CrSettingsSearchPageTest.prototype = {
108 __proto__: CrSettingsBrowserTest.prototype, 129 __proto__: CrSettingsBrowserTest.prototype,
109 130
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ 328 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
308 ROOT_PATH + 'ui/webui/resources/js/promise_resolver.js', 329 ROOT_PATH + 'ui/webui/resources/js/promise_resolver.js',
309 'test_browser_proxy.js', 330 'test_browser_proxy.js',
310 'startup_urls_page_test.js', 331 'startup_urls_page_test.js',
311 ]), 332 ]),
312 }; 333 };
313 334
314 TEST_F('CrSettingsStartupUrlsPageTest', 'Validity', function() { 335 TEST_F('CrSettingsStartupUrlsPageTest', 'Validity', function() {
315 mocha.run(); 336 mocha.run();
316 }); 337 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698