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

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

Issue 2360873005: MD Settings: Cleanup, remove unnecessary <cr-settings> wrapper. (Closed)
Patch Set: Remove more Created 4 years, 3 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 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 /** @fileoverview Prototype for Settings page tests. */ 5 /** @fileoverview Prototype for Settings page tests. */
6 6
7 /** @const {string} Path to root from chrome/test/data/webui/settings/. */ 7 /** @const {string} Path to root from chrome/test/data/webui/settings/. */
8 var ROOT_PATH = '../../../../../'; 8 var ROOT_PATH = '../../../../../';
9 9
10 // Polymer BrowserTest fixture. 10 // Polymer BrowserTest fixture.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 assert(!!settingsMain); 48 assert(!!settingsMain);
49 settingsMain.toggleAdvancedPage_(); 49 settingsMain.toggleAdvancedPage_();
50 Polymer.dom.flush(); 50 Polymer.dom.flush();
51 }, 51 },
52 52
53 /** 53 /**
54 * @param {string} type The settings page type, e.g. 'advanced' or 'basic'. 54 * @param {string} type The settings page type, e.g. 'advanced' or 'basic'.
55 * @return {!PolymerElement} The PolymerElement for the page. 55 * @return {!PolymerElement} The PolymerElement for the page.
56 */ 56 */
57 getPage: function(type) { 57 getPage: function(type) {
58 var settings = document.querySelector('cr-settings'); 58 var settingsUi = document.querySelector('settings-ui');
59 assertTrue(!!settings);
60 var settingsUi = settings.$$('settings-ui');
61 assertTrue(!!settingsUi); 59 assertTrue(!!settingsUi);
62 var settingsMain = settingsUi.$$('settings-main'); 60 var settingsMain = settingsUi.$$('settings-main');
63 assertTrue(!!settingsMain); 61 assertTrue(!!settingsMain);
64 var pageType = 'settings-' + type + '-page'; 62 var pageType = 'settings-' + type + '-page';
65 var page = settingsMain.$$(pageType); 63 var page = settingsMain.$$(pageType);
66 assertTrue(!!page); 64 assertTrue(!!page);
67 return page; 65 return page;
68 }, 66 },
69 67
70 /** 68 /**
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // Any other stamped subpages should not be visible. 109 // Any other stamped subpages should not be visible.
112 var subpages = stampedChildren.filter(function(element) { 110 var subpages = stampedChildren.filter(function(element) {
113 return element.getAttribute('route-path') != 'default'; 111 return element.getAttribute('route-path') != 'default';
114 }); 112 });
115 for (var subpage of subpages) { 113 for (var subpage of subpages) {
116 assertEquals(subpage.offsetHeight, 0, 'Expected subpage #' + subpage.id + 114 assertEquals(subpage.offsetHeight, 0, 'Expected subpage #' + subpage.id +
117 ' in ' + section.section + ' not to be visible.'); 115 ' in ' + section.section + ' not to be visible.');
118 } 116 }
119 }, 117 },
120 }; 118 };
OLDNEW
« no previous file with comments | « chrome/test/data/webui/settings/on_startup_browsertest.js ('k') | chrome/test/data/webui/settings/settings_ui_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698