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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/settings/appearance_browsertest.js
diff --git a/chrome/test/data/webui/settings/appearance_browsertest.js b/chrome/test/data/webui/settings/appearance_browsertest.js
new file mode 100644
index 0000000000000000000000000000000000000000..1ba4d4b5b37206cbba723d5b4875ad71d51faeb1
--- /dev/null
+++ b/chrome/test/data/webui/settings/appearance_browsertest.js
@@ -0,0 +1,46 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/** @fileoverview Runs Polymer Appearance Settings elements. */
+
+GEN_INCLUDE(['settings_page_browsertest.js']);
+
+/**
+ * Test Polymer Appearance Settings elements.
+ * @constructor
+ * @extends {SettingsPageBrowserTest}
+*/
+function AppearanceSettingsBrowserTest() {}
+
+AppearanceSettingsBrowserTest.prototype = {
+ __proto__: SettingsPageBrowserTest.prototype,
+
+ /** @return {string} */
+ appearancePage: function(selector) {
+ var section = this.getSection(this.getPage('basic'), 'appearance');
+ assertTrue(!!section);
+ var appearance = section.querySelector('settings-appearance-page');
+ assertTrue(!!appearance);
+ var result = appearance.$$(selector);
+ assertTrue(!!result);
+ return result;
+ },
+};
+
+TEST_F('AppearanceSettingsBrowserTest', 'uiTests', function() {
+ var self = this;
+ suite('AppearanceHandler', function() {
+ test('font settings', function() {
+ var fontSize = self.appearancePage(
+ '#defaultFontSize').$$('[class=iron-selected]');
+ assertEquals('Medium', fontSize.textContent);
+ });
+
+ test('home button', function() {
+ var homeButton = self.appearancePage('#showHomeButton');
+ assertEquals('false', homeButton.getAttribute('aria-pressed'));
+ });
+ });
+ mocha.run();
+});
« 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