| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** @fileoverview Tests for cr-action-menu element. */ | 5 /** |
| 6 * @fileoverview Tests for cr-action-menu element. Runs as an interactive UI |
| 7 * test, since many of these tests check focus behavior. |
| 8 */ |
| 6 suite('CrActionMenu', function() { | 9 suite('CrActionMenu', function() { |
| 7 /** @type {?CrActionMenuElement} */ | 10 /** @type {?CrActionMenuElement} */ |
| 8 var menu = null; | 11 var menu = null; |
| 9 | 12 |
| 10 /** @type {?NodeList<HTMLElement>} */ | 13 /** @type {?NodeList<HTMLElement>} */ |
| 11 var items = null; | 14 var items = null; |
| 12 | 15 |
| 13 setup(function() { | 16 setup(function() { |
| 14 PolymerTest.clearBody(); | 17 PolymerTest.clearBody(); |
| 15 | 18 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 MockInteractions.keyDownOn(menu, key, [], key); | 108 MockInteractions.keyDownOn(menu, key, [], key); |
| 106 assertFalse(menu.open); | 109 assertFalse(menu.open); |
| 107 }); | 110 }); |
| 108 } | 111 } |
| 109 | 112 |
| 110 test('close on Tab', function() { return testFocusAfterClosing('Tab'); }); | 113 test('close on Tab', function() { return testFocusAfterClosing('Tab'); }); |
| 111 test('close on Escape', function() { | 114 test('close on Escape', function() { |
| 112 return testFocusAfterClosing('Escape'); | 115 return testFocusAfterClosing('Escape'); |
| 113 }); | 116 }); |
| 114 }); | 117 }); |
| OLD | NEW |