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

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

Issue 2518233004: MD Settings: Move settings-advanced-page into settings-basic-page (Closed)
Patch Set: rebase Created 4 years 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 28 matching lines...) Expand all
39 return CrSettingsPrefs.initialized; 39 return CrSettingsPrefs.initialized;
40 }); 40 });
41 }, 41 },
42 42
43 /** 43 /**
44 * Toggles the Advanced sections. 44 * Toggles the Advanced sections.
45 */ 45 */
46 toggleAdvanced: function() { 46 toggleAdvanced: function() {
47 var settingsMain = document.querySelector('* /deep/ settings-main'); 47 var settingsMain = document.querySelector('* /deep/ settings-main');
48 assert(!!settingsMain); 48 assert(!!settingsMain);
49 settingsMain.toggleAdvancedPage_(); 49 settingsMain.advancedToggleExpanded = !settingsMain.advancedToggleExpanded;
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. 'about' 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 settingsUi = document.querySelector('settings-ui'); 58 var settingsUi = document.querySelector('settings-ui');
59 assertTrue(!!settingsUi); 59 assertTrue(!!settingsUi);
60 var settingsMain = settingsUi.$$('settings-main'); 60 var settingsMain = settingsUi.$$('settings-main');
61 assertTrue(!!settingsMain); 61 assertTrue(!!settingsMain);
62 var pageType = 'settings-' + type + '-page'; 62 var pageType = 'settings-' + type + '-page';
63 var page = settingsMain.$$(pageType); 63 var page = settingsMain.$$(pageType);
64 assertTrue(!!page); 64 assertTrue(!!page);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // Any other stamped subpages should not be visible. 109 // Any other stamped subpages should not be visible.
110 var subpages = stampedChildren.filter(function(element) { 110 var subpages = stampedChildren.filter(function(element) {
111 return element.getAttribute('route-path') != 'default'; 111 return element.getAttribute('route-path') != 'default';
112 }); 112 });
113 for (var subpage of subpages) { 113 for (var subpage of subpages) {
114 assertEquals(subpage.offsetHeight, 0, 'Expected subpage #' + subpage.id + 114 assertEquals(subpage.offsetHeight, 0, 'Expected subpage #' + subpage.id +
115 ' in ' + section.section + ' not to be visible.'); 115 ' in ' + section.section + ' not to be visible.');
116 } 116 }
117 }, 117 },
118 }; 118 };
OLDNEW
« no previous file with comments | « chrome/test/data/webui/settings/settings_main_test.js ('k') | chrome/test/data/webui/settings/settings_subpage_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698