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

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

Issue 2697453008: [MD settings] expand subpages to 100% (Closed)
Patch Set: async Created 3 years, 10 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/resources/settings/basic_page/basic_page.js ('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 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 cr.define('settings_main_page', function() { 5 cr.define('settings_main_page', function() {
6 /** 6 /**
7 * Extending TestBrowserProxy even though SearchManager is not a browser proxy 7 * Extending TestBrowserProxy even though SearchManager is not a browser proxy
8 * itself. Essentially TestBrowserProxy can act as a "proxy" for any external 8 * itself. Essentially TestBrowserProxy can act as a "proxy" for any external
9 * dependency, not just "browser proxies" (and maybe should be renamed to 9 * dependency, not just "browser proxies" (and maybe should be renamed to
10 * TestProxy). 10 * TestProxy).
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 * Asserts the visibility of the basic and advanced pages. 169 * Asserts the visibility of the basic and advanced pages.
170 * @param {string} Expected 'display' value for the basic page. 170 * @param {string} Expected 'display' value for the basic page.
171 * @param {string} Expected 'display' value for the advanced page. 171 * @param {string} Expected 'display' value for the advanced page.
172 */ 172 */
173 function assertPageVisibility(expectedBasic, expectedAdvanced) { 173 function assertPageVisibility(expectedBasic, expectedAdvanced) {
174 Polymer.dom.flush(); 174 Polymer.dom.flush();
175 var page = settingsMain.$$('settings-basic-page'); 175 var page = settingsMain.$$('settings-basic-page');
176 assertEquals( 176 assertEquals(
177 expectedBasic, page.$$('#basicPage').style.display); 177 expectedBasic, page.$$('#basicPage').style.display);
178 assertEquals( 178 assertEquals(
179 expectedAdvanced, page.$.advancedPageTemplate.get().style.display); 179 expectedAdvanced,
180 page.$$('#advancedPageTemplate').get().style.display);
180 } 181 }
181 182
182 // TODO(michaelpg): It would be better not to drill into 183 // TODO(michaelpg): It would be better not to drill into
183 // settings-basic-page. If search should indeed only work in Settings 184 // settings-basic-page. If search should indeed only work in Settings
184 // (as opposed to Advanced), perhaps some of this logic should be 185 // (as opposed to Advanced), perhaps some of this logic should be
185 // delegated to settings-basic-page now instead of settings-main. 186 // delegated to settings-basic-page now instead of settings-main.
186 187
187 /** 188 /**
188 * Asserts the visibility of the basic and advanced pages after exiting 189 * Asserts the visibility of the basic and advanced pages after exiting
189 * search mode. 190 * search mode.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 265
265 assertPageVisibility('', ''); 266 assertPageVisibility('', '');
266 }); 267 });
267 }); 268 });
268 } 269 }
269 270
270 return { 271 return {
271 registerTests: registerTests, 272 registerTests: registerTests,
272 }; 273 };
273 }); 274 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/basic_page/basic_page.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698