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

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

Issue 1462723002: [MD settings] adding a test for Appearance settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: patch fix Created 5 years, 1 month 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/test/data/webui/settings/appearance_browsertest.js ('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 11 matching lines...) Expand all
22 22
23 /** @override */ 23 /** @override */
24 browsePreload: 'chrome://md-settings/', 24 browsePreload: 'chrome://md-settings/',
25 25
26 /** @override */ 26 /** @override */
27 extraLibraries: PolymerTest.getLibraries(ROOT_PATH), 27 extraLibraries: PolymerTest.getLibraries(ROOT_PATH),
28 28
29 /** @override */ 29 /** @override */
30 runAccessibilityChecks: false, 30 runAccessibilityChecks: false,
31 31
32 /** @override */
33 setUp: function() {
34 suiteSetup(function() {
35 return CrSettingsPrefs.initialized;
36 });
37 },
38
32 /** 39 /**
33 * @param {string} type The settings page type, e.g. 'advanced' or 'basic'. 40 * @param {string} type The settings page type, e.g. 'advanced' or 'basic'.
34 * @return {Node} The DOM node for the page. 41 * @return {Node} The DOM node for the page.
35 */ 42 */
36 getPage: function(type) { 43 getPage: function(type) {
37 var settings = document.querySelector('cr-settings'); 44 var settings = document.querySelector('cr-settings');
38 assertTrue(!!settings); 45 assertTrue(!!settings);
39 var settingsUi = settings.shadowRoot.querySelector('settings-ui'); 46 var settingsUi = settings.shadowRoot.querySelector('settings-ui');
40 assertTrue(!!settingsUi); 47 assertTrue(!!settingsUi);
41 var settingsMain = settingsUi.shadowRoot.querySelector('settings-main'); 48 var settingsMain = settingsUi.shadowRoot.querySelector('settings-main');
(...skipping 18 matching lines...) Expand all
60 assertGT(len, 0); 67 assertGT(len, 0);
61 for (var i = 0; i < len; ++i) { 68 for (var i = 0; i < len; ++i) {
62 var s = sections[i]; 69 var s = sections[i];
63 if (s.section == section) 70 if (s.section == section)
64 return s; 71 return s;
65 } 72 }
66 assertNotReached('Section not found: ' + section + ' in ' + page); 73 assertNotReached('Section not found: ' + section + ' in ' + page);
67 return undefined; 74 return undefined;
68 }, 75 },
69 }; 76 };
OLDNEW
« no previous file with comments | « chrome/test/data/webui/settings/appearance_browsertest.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698