OLD | NEW |
---|---|
(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 }); | |
OLD | NEW |