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

Side by Side Diff: chrome/test/data/webui/settings/appearance_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: review changes 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/chrome_tests.gypi ('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
(Empty)
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
3 // found in the LICENSE file.
4
5 /** @fileoverview Runs Polymer Appearance Settings elements. */
6
7 // Polymer BrowserTest fixture.
stevenjb 2015/11/20 17:59:37 Michael pointed out this comment is no longer accu
dschuyler 2015/11/20 18:12:11 Done.
8 GEN_INCLUDE(['settings_page_browsertest.js']);
9
10 /**
11 * Test Polymer Appearance Settings elements.
12 * @constructor
13 * @extends {PolymerTest}
stevenjb 2015/11/20 17:16:07 @extends {SettingsPageBrowserTest}
dschuyler 2015/11/20 18:12:10 Done.
14 */
15 function AppearanceSettingsBrowserTest() {}
16
17 AppearanceSettingsBrowserTest.prototype = {
18 __proto__: SettingsPageBrowserTest.prototype,
19
20 /** @return {string} */
21 appearancePage: function(selector) {
22 var section = this.getSection(this.getPage('basic'), 'appearance');
23 assertTrue(!!section);
24 var appearance = section.querySelector('settings-appearance-page');
25 assertTrue(!!appearance);
26 var result = appearance.$$(selector);
27 assertTrue(!!result);
28 return result;
29 },
30 };
31
32 TEST_F('AppearanceSettingsBrowserTest', 'uiTests', function() {
33 var self = this;
34 suite('AppearanceHandler', function() {
35 test('font settings', function() {
36 var fontSize = self.appearancePage(
37 '#defaultFontSize').$$('[class=iron-selected]');
38 assertEquals('Medium', fontSize.textContent);
stevenjb 2015/11/20 17:16:07 nit: Personally I would just assertTrue(!!fontSize
michaelpg 2015/11/20 17:23:41 Dumb question: how do we know the prefs have loade
stevenjb 2015/11/20 17:59:37 That's actually a good question. My guess is "they
dschuyler 2015/11/20 18:02:40 I'm thinking that the prefs in this test will be r
michaelpg 2015/11/20 18:07:44 We don't need a wrapper per se. In settings_page_b
dschuyler 2015/11/20 18:12:11 Cool. I'd like to think about explicitly setting
39 });
40
41 test('home button', function() {
42 var homeButton = self.appearancePage('#showHomeButton');
43 assertEquals('false', homeButton.getAttribute('aria-pressed'));
44 });
45 });
46 mocha.run();
47 });
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698