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

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: 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/chrome_tests.gypi ('k') | chrome/test/data/webui/settings/settings_page_browsertest.js » ('j') | 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 GEN_INCLUDE(['settings_page_browsertest.js']);
8
9 /**
10 * Test Polymer Appearance Settings elements.
11 * @constructor
12 * @extends {SettingsPageBrowserTest}
13 */
14 function AppearanceSettingsBrowserTest() {}
15
16 AppearanceSettingsBrowserTest.prototype = {
17 __proto__: SettingsPageBrowserTest.prototype,
18
19 /** @return {string} */
20 appearancePage: function(selector) {
21 var section = this.getSection(this.getPage('basic'), 'appearance');
22 assertTrue(!!section);
23 var appearance = section.querySelector('settings-appearance-page');
24 assertTrue(!!appearance);
25 var result = appearance.$$(selector);
26 assertTrue(!!result);
27 return result;
28 },
29 };
30
31 TEST_F('AppearanceSettingsBrowserTest', 'uiTests', function() {
32 var self = this;
33 suite('AppearanceHandler', function() {
34 test('font settings', function() {
35 var fontSize = self.appearancePage(
36 '#defaultFontSize').$$('[class=iron-selected]');
37 assertEquals('Medium', fontSize.textContent);
38 });
39
40 test('home button', function() {
41 var homeButton = self.appearancePage('#showHomeButton');
42 assertEquals('false', homeButton.getAttribute('aria-pressed'));
43 });
44 });
45 mocha.run();
46 });
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/data/webui/settings/settings_page_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698