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

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

Issue 2255023002: Settings: Remove /advanced usage as URL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 4 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 23 matching lines...) Expand all
34 34
35 /** @override */ 35 /** @override */
36 setUp: function() { 36 setUp: function() {
37 PolymerTest.prototype.setUp.call(this); 37 PolymerTest.prototype.setUp.call(this);
38 suiteSetup(function() { 38 suiteSetup(function() {
39 return CrSettingsPrefs.initialized; 39 return CrSettingsPrefs.initialized;
40 }); 40 });
41 }, 41 },
42 42
43 /** 43 /**
44 * Toggles the Advanced sections.
45 */
46 toggleAdvanced: function() {
47 var settingsMain = document.querySelector('* /deep/ settings-main');
48 assert(!!settingsMain);
49 settingsMain.toggleAdvancedPage_();
50 Polymer.dom.flush();
51 },
52
53 /**
44 * @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'.
45 * @return {!PolymerElement} The PolymerElement for the page. 55 * @return {!PolymerElement} The PolymerElement for the page.
46 */ 56 */
47 getPage: function(type) { 57 getPage: function(type) {
48 var settings = document.querySelector('cr-settings'); 58 var settings = document.querySelector('cr-settings');
49 assertTrue(!!settings); 59 assertTrue(!!settings);
50 var settingsUi = settings.$$('settings-ui'); 60 var settingsUi = settings.$$('settings-ui');
51 assertTrue(!!settingsUi); 61 assertTrue(!!settingsUi);
52 var settingsMain = settingsUi.$$('settings-main'); 62 var settingsMain = settingsUi.$$('settings-main');
53 assertTrue(!!settingsMain); 63 assertTrue(!!settingsMain);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // Any other stamped subpages should not be visible. 111 // Any other stamped subpages should not be visible.
102 var subpages = stampedChildren.filter(function(element) { 112 var subpages = stampedChildren.filter(function(element) {
103 return element.getAttribute('route-path') != 'default'; 113 return element.getAttribute('route-path') != 'default';
104 }); 114 });
105 for (var subpage of subpages) { 115 for (var subpage of subpages) {
106 assertEquals(subpage.offsetHeight, 0, 'Expected subpage #' + subpage.id + 116 assertEquals(subpage.offsetHeight, 0, 'Expected subpage #' + subpage.id +
107 ' in ' + section.section + ' not to be visible.'); 117 ' in ' + section.section + ' not to be visible.');
108 } 118 }
109 }, 119 },
110 }; 120 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698