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

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

Issue 2749513004: MD Settings: adjust iron-list focus row behaviors. (Closed)
Patch Set: fix test Created 3 years, 9 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
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
deleted file mode 100644
index 3decda4e417e9f697c75396851f404db52e19021..0000000000000000000000000000000000000000
--- a/chrome/test/data/webui/settings/focusable_iron_list_item_behavior_test.js
+++ /dev/null
@@ -1,62 +0,0 @@
-// 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'));
- });
-
- test('"enter" key event should not propagate out of element', function() {
- var container = document.createElement('div');
- container.appendChild(testElement);
- document.body.appendChild(container);
-
- var reached = false;
- container.addEventListener('keydown', function() {
- reached = true;
- });
-
- MockInteractions.keyEventOn(testElement, 'keydown', 13, undefined, 'Enter');
- assertFalse(reached);
-
- // Test other keys still work.
- MockInteractions.keyEventOn(testElement, 'keydown', 9, undefined, 'Tab');
- assertTrue(reached);
- });
-});
« no previous file with comments | « chrome/test/data/webui/settings/focus_row_behavior_test.js ('k') | ui/webui/resources/js/cr/ui/focus_row.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698