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

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

Issue 2106103006: MD Settings: cr/cros - Guest mode page visibility (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after overscrollHeight_() fix Created 4 years, 4 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 | « chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc ('k') | 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 /** 5 /**
6 * @fileoverview Suite of tests to ensure that settings subpages exist and 6 * @fileoverview Suite of tests to ensure that settings subpages exist and
7 * load without errors. Also outputs approximate load times for each subpage. 7 * load without errors. Also outputs approximate load times for each subpage.
8 */ 8 */
9 9
10 GEN_INCLUDE(['settings_page_browsertest.js']); 10 GEN_INCLUDE(['settings_page_browsertest.js']);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 Polymer.dom.flush(); 77 Polymer.dom.flush();
78 var dtime = window.performance.now() - startTime; 78 var dtime = window.performance.now() - startTime;
79 console.log('Page: ' + subPage + ' Load time: ' + dtime.toFixed(0) + ' ms'); 79 console.log('Page: ' + subPage + ' Load time: ' + dtime.toFixed(0) + ' ms');
80 expectTrue(!!this.getSection(page, subPage)); 80 expectTrue(!!this.getSection(page, subPage));
81 // Hide the page so that it doesn't interfere with other subPages. 81 // Hide the page so that it doesn't interfere with other subPages.
82 page.set('pageVisibility.' + subPage, false); 82 page.set('pageVisibility.' + subPage, false);
83 Polymer.dom.flush(); 83 Polymer.dom.flush();
84 }, 84 },
85 85
86 testSubPages: function() { 86 testSubPages: function() {
87 Polymer.dom.flush();
87 var page = this.getPage(this.pageId); 88 var page = this.getPage(this.pageId);
88 this.subPages.forEach(function(subPage) { 89 this.subPages.forEach(function(subPage) {
89 if (this.includePage(subPage)) 90 if (this.includePage(subPage))
90 test(subPage, this.testPage.bind(this, page, subPage)); 91 test(subPage, this.testPage.bind(this, page, subPage));
91 }.bind(this)); 92 }.bind(this));
92 }, 93 },
93 94
94 /** 95 /**
95 * @param {string} id 96 * @param {string} id
96 * @return {boolean} 97 * @return {boolean}
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 __proto__: SettingsSubPageBrowserTest.prototype, 148 __proto__: SettingsSubPageBrowserTest.prototype,
148 149
149 /** @override */ 150 /** @override */
150 browsePreload: 'chrome://md-settings/advanced', 151 browsePreload: 'chrome://md-settings/advanced',
151 }; 152 };
152 153
153 TEST_F('SettingsAdvancedSubPageBrowserTest', 'SubPages', function() { 154 TEST_F('SettingsAdvancedSubPageBrowserTest', 'SubPages', function() {
154 suite('Advanced', this.testSubPages.bind(this)); 155 suite('Advanced', this.testSubPages.bind(this));
155 mocha.run(); 156 mocha.run();
156 }); 157 });
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698