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