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

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

Issue 2660383002: [MD settings] idle load basic and advanced pages (Closed)
Patch Set: merge with master; changed test name 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
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.$$('#advancedPage').style.display); 179 expectedAdvanced, page.$.advancedPageTemplate.get().style.display);
180 } 180 }
181 181
182 // TODO(michaelpg): It would be better not to drill into 182 // TODO(michaelpg): It would be better not to drill into
183 // settings-basic-page. If search should indeed only work in Settings 183 // settings-basic-page. If search should indeed only work in Settings
184 // (as opposed to Advanced), perhaps some of this logic should be 184 // (as opposed to Advanced), perhaps some of this logic should be
185 // delegated to settings-basic-page now instead of settings-main. 185 // delegated to settings-basic-page now instead of settings-main.
186 186
187 /** 187 /**
188 * Asserts the visibility of the basic and advanced pages after exiting 188 * Asserts the visibility of the basic and advanced pages after exiting
189 * search mode. 189 * search mode.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 264
265 assertPageVisibility('', ''); 265 assertPageVisibility('', '');
266 }); 266 });
267 }); 267 });
268 } 268 }
269 269
270 return { 270 return {
271 registerTests: registerTests, 271 registerTests: registerTests,
272 }; 272 };
273 }); 273 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698