| 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
|
| index ca95400ad68ec1867f9d0680f66c77fbfaf1a4a3..3decda4e417e9f697c75396851f404db52e19021 100644
|
| --- 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
|
| @@ -41,4 +41,22 @@ suite('focusable-iron-list-item-behavior', function() {
|
| 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);
|
| + });
|
| });
|
|
|