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

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: Fix tests. 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() {
Dan Beam 2017/03/18 00:15:51 please add a note that you're intentionally bypass
dpapad 2017/03/20 20:34:55 Done.
30 PolymerTest.prototype.setUp.call(this);
31 },
27 }; 32 };
28 33
29 TEST_F('SettingsHelpPageBrowserTest', 'Load', function() { 34 TEST_F('SettingsHelpPageBrowserTest', 'Load', function() {
30 // Assign |self| to |this| instead of binding since 'this' in suite() 35 // Assign |self| to |this| instead of binding since 'this' in suite()
31 // and test() will be a Mocha 'Suite' or 'Test' instance. 36 // and test() will be a Mocha 'Suite' or 'Test' instance.
32 var self = this; 37 var self = this;
33 38
34 // Register mocha tests. 39 // Register mocha tests.
35 suite('Help page', function() { 40 suite('Help page', function() {
36 test('about section', function() { 41 test('about section', function() {
37 var page = self.getPage('about'); 42 return self.getPage('about').then(function(page) {
38 expectTrue(!!self.getSection(page, 'about')); 43 expectTrue(!!self.getSection(page, 'about'));
44 });
39 }); 45 });
40 }); 46 });
41 47
42 // Run all registered tests. 48 // Run all registered tests.
43 mocha.run(); 49 mocha.run();
44 }); 50 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698