| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 suite('<bookmarks-toolbar>', function() { | 5 suite('<bookmarks-toolbar>', function() { |
| 6 var toolbar; | 6 var toolbar; |
| 7 var store; | 7 var store; |
| 8 var commandManager; | 8 var commandManager; |
| 9 | 9 |
| 10 suiteSetup(function() { | 10 suiteSetup(function() { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 test('clicking overlay delete button triggers a delete command', function() { | 46 test('clicking overlay delete button triggers a delete command', function() { |
| 47 store.data.selection.items = new Set(['2', '3']); | 47 store.data.selection.items = new Set(['2', '3']); |
| 48 store.notifyObservers(); | 48 store.notifyObservers(); |
| 49 | 49 |
| 50 Polymer.dom.flush(); | 50 Polymer.dom.flush(); |
| 51 MockInteractions.tap( | 51 MockInteractions.tap( |
| 52 toolbar.$$('cr-toolbar-selection-overlay').deleteButton); | 52 toolbar.$$('cr-toolbar-selection-overlay').deleteButton); |
| 53 | 53 |
| 54 commandManager.assertLastCommand(Command.DELETE, ['2', '3']); | 54 commandManager.assertLastCommand(Command.DELETE, ['2', '3']); |
| 55 }); | 55 }); |
| 56 |
| 57 test('commands do not trigger from the search field', function() { |
| 58 store.data.selection.items = new Set(['2']); |
| 59 store.notifyObservers(); |
| 60 |
| 61 var input = toolbar.$$('cr-toolbar').getSearchField().getSearchInput(); |
| 62 var modifier = cr.isMac ? 'meta' : 'ctrl'; |
| 63 MockInteractions.pressAndReleaseKeyOn(input, 67, modifier, 'c'); |
| 64 |
| 65 commandManager.assertLastCommand(null); |
| 66 }); |
| 56 }); | 67 }); |
| OLD | NEW |