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

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

Issue 2054013002: [MD settings] advanced toggle; add scrollWhenReady (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review nits Created 4 years, 6 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/settings_root_css.html ('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 /** @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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 * @param {string} type The settings page type, e.g. 'advanced' or 'basic'. 44 * @param {string} type The settings page type, e.g. 'advanced' or 'basic'.
45 * @return {!PolymerElement} The PolymerElement for the page. 45 * @return {!PolymerElement} The PolymerElement for the page.
46 */ 46 */
47 getPage: function(type) { 47 getPage: function(type) {
48 var settings = document.querySelector('cr-settings'); 48 var settings = document.querySelector('cr-settings');
49 assertTrue(!!settings); 49 assertTrue(!!settings);
50 var settingsUi = settings.$$('settings-ui'); 50 var settingsUi = settings.$$('settings-ui');
51 assertTrue(!!settingsUi); 51 assertTrue(!!settingsUi);
52 var settingsMain = settingsUi.$$('settings-main'); 52 var settingsMain = settingsUi.$$('settings-main');
53 assertTrue(!!settingsMain); 53 assertTrue(!!settingsMain);
54 var pages = settingsMain.$.pageContainer;
55 assertTrue(!!pages);
56 var pageType = 'settings-' + type + '-page'; 54 var pageType = 'settings-' + type + '-page';
57 var page = pages.querySelector(pageType); 55 var page = settingsMain.$$(pageType);
58 assertTrue(!!page); 56 assertTrue(!!page);
59 return page; 57 return page;
60 }, 58 },
61 59
62 /** 60 /**
63 * @param {!PolymerElement} page The PolymerElement for the page containing 61 * @param {!PolymerElement} page The PolymerElement for the page containing
64 * |section|. 62 * |section|.
65 * @param {string} section The settings page section, e.g. 'appearance'. 63 * @param {string} section The settings page section, e.g. 'appearance'.
66 * @return {Node|undefined} The DOM node for the section. 64 * @return {Node|undefined} The DOM node for the section.
67 */ 65 */
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // Any other stamped subpages should not be visible. 128 // Any other stamped subpages should not be visible.
131 var subpages = stampedChildren.filter(function(element) { 129 var subpages = stampedChildren.filter(function(element) {
132 return element.id != 'main'; 130 return element.id != 'main';
133 }); 131 });
134 for (var subpage of subpages) { 132 for (var subpage of subpages) {
135 assertEquals(subpage.offsetHeight, 0, 'Expected subpage #' + subpage.id + 133 assertEquals(subpage.offsetHeight, 0, 'Expected subpage #' + subpage.id +
136 ' in ' + section.section + ' not to be visible.'); 134 ' in ' + section.section + ' not to be visible.');
137 } 135 }
138 }, 136 },
139 }; 137 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/settings_root_css.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698