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

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

Issue 2754563002: MD Settings: Lazy load the contents of the "advanced" settings. (Closed)
Patch Set: Address comments. Created 3 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 Material Help page tests. */ 5 /** @fileoverview Material Help page tests. */
6 6
7 GEN_INCLUDE(['settings_page_browsertest.js']); 7 GEN_INCLUDE(['settings_page_browsertest.js']);
8 GEN('#include "base/command_line.h"'); 8 GEN('#include "base/command_line.h"');
9 9
10 /** 10 /**
11 * @constructor 11 * @constructor
12 * @extends {SettingsPageBrowserTest} 12 * @extends {SettingsPageBrowserTest}
13 */ 13 */
14 function SettingsHelpPageBrowserTest() {} 14 function SettingsHelpPageBrowserTest() {}
15 15
16 SettingsHelpPageBrowserTest.prototype = { 16 SettingsHelpPageBrowserTest.prototype = {
17 __proto__: SettingsPageBrowserTest.prototype, 17 __proto__: SettingsPageBrowserTest.prototype,
18 18
19 /** @override */ 19 /** @override */
20 browsePreload: 'chrome://help/', 20 browsePreload: 'chrome://help/',
21 21
22 commandLineSwitches: [{switchName: 'enable-features', 22 commandLineSwitches: [{switchName: 'enable-features',
23 switchValue: 'MaterialDesignSettings'}], 23 switchValue: 'MaterialDesignSettings'}],
24 24
25 /** @override */ 25 /** @override */
26 extraLibraries: PolymerTest.getLibraries(ROOT_PATH), 26 extraLibraries: PolymerTest.getLibraries(ROOT_PATH),
27
28 /** @override */
29 setUp: function() {
30 // Intentionally bypassing SettingsPageBrowserTest#setUp.
31 PolymerTest.prototype.setUp.call(this);
32 },
27 }; 33 };
28 34
29 TEST_F('SettingsHelpPageBrowserTest', 'Load', function() { 35 TEST_F('SettingsHelpPageBrowserTest', 'Load', function() {
30 // Assign |self| to |this| instead of binding since 'this' in suite() 36 // Assign |self| to |this| instead of binding since 'this' in suite()
31 // and test() will be a Mocha 'Suite' or 'Test' instance. 37 // and test() will be a Mocha 'Suite' or 'Test' instance.
32 var self = this; 38 var self = this;
33 39
34 // Register mocha tests. 40 // Register mocha tests.
35 suite('Help page', function() { 41 suite('Help page', function() {
36 test('about section', function() { 42 test('about section', function() {
37 var page = self.getPage('about'); 43 return self.getPage('about').then(function(page) {
38 expectTrue(!!self.getSection(page, 'about')); 44 expectTrue(!!self.getSection(page, 'about'));
45 });
39 }); 46 });
40 }); 47 });
41 48
42 // Run all registered tests. 49 // Run all registered tests.
43 mocha.run(); 50 mocha.run();
44 }); 51 });
OLDNEW
« no previous file with comments | « chrome/test/data/webui/settings/ensure_lazy_loaded.js ('k') | chrome/test/data/webui/settings/languages_page_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698