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

Unified Diff: chrome/test/data/webui/settings/focusable_iron_list_item_behavior_test.js

Issue 2700863002: MD Settings: adjust focus-outline behaviors on search engine iron-list. (Closed)
Patch Set: fixes based on comments Created 3 years, 10 months 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/test/data/webui/settings/cr_settings_browsertest.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/settings/focusable_iron_list_item_behavior_test.js
diff --git a/chrome/test/data/webui/settings/focusable_iron_list_item_behavior_test.js b/chrome/test/data/webui/settings/focusable_iron_list_item_behavior_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..ca95400ad68ec1867f9d0680f66c77fbfaf1a4a3
--- /dev/null
+++ b/chrome/test/data/webui/settings/focusable_iron_list_item_behavior_test.js
@@ -0,0 +1,44 @@
+// Copyright 2017 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.
+
+suite('focusable-iron-list-item-behavior', function() {
+ /** @type {FocusableIronListItemElement} */ var testElement;
+
+ suiteSetup(function() {
+ Polymer({
+ is: 'focusable-item',
+ behaviors: [FocusableIronListItemBehavior],
+ });
+ });
+
+ setup(function() {
+ PolymerTest.clearBody();
+
+ testElement = document.createElement('focusable-item');
+ document.body.appendChild(testElement);
+ });
+
+ test('clicking applies .no-outline', function() {
+ assertFalse(testElement.classList.contains('no-outline'));
+ MockInteractions.tap(testElement);
+ assertTrue(testElement.classList.contains('no-outline'));
+ });
+
+ test('clicking doesn\'t apply .no-outline to key-focused item', function() {
+ assertFalse(testElement.classList.contains('no-outline'));
+ MockInteractions.keyUpOn(testElement);
+ MockInteractions.tap(testElement);
+ assertFalse(testElement.classList.contains('no-outline'));
+ });
+
+ test('clicking applies .no-outline to key-blurred item', function() {
+ assertFalse(testElement.classList.contains('no-outline'));
+ MockInteractions.keyUpOn(testElement);
+ MockInteractions.tap(testElement);
+ assertFalse(testElement.classList.contains('no-outline'));
+ MockInteractions.keyDownOn(testElement);
+ MockInteractions.tap(testElement);
+ assertTrue(testElement.classList.contains('no-outline'));
+ });
+});
« no previous file with comments | « chrome/test/data/webui/settings/cr_settings_browsertest.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698