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

Side by Side Diff: chrome/test/data/webui/md_bookmarks/toolbar_test.js

Issue 2885353002: MD Bookmarks: Prevent keyboard shortcuts when the toolbar/dialogs are focused (Closed)
Patch Set: Add a test Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « chrome/test/data/webui/md_bookmarks/md_bookmarks_focus_test.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 });
OLDNEW
« no previous file with comments | « chrome/test/data/webui/md_bookmarks/md_bookmarks_focus_test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698