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-command-manager>', function() { | 5 suite('<bookmarks-command-manager>', function() { |
6 var commandManager; | 6 var commandManager; |
7 var store; | 7 var store; |
8 var lastCommand; | 8 var lastCommand; |
9 var lastCommandIds; | 9 var lastCommandIds; |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 createFolder( | 36 createFolder( |
37 '2', | 37 '2', |
38 [ | 38 [ |
39 createFolder('21', []), | 39 createFolder('21', []), |
40 ])) | 40 ])) |
41 }); | 41 }); |
42 store.replaceSingleton(); | 42 store.replaceSingleton(); |
43 | 43 |
44 commandManager = new TestCommandManager(); | 44 commandManager = new TestCommandManager(); |
45 replaceBody(commandManager); | 45 replaceBody(commandManager); |
| 46 document.body.appendChild( |
| 47 document.createElement('bookmarks-toast-manager')); |
46 | 48 |
47 Polymer.dom.flush(); | 49 Polymer.dom.flush(); |
48 }); | 50 }); |
49 | 51 |
50 test('can only copy single URL items', function() { | 52 test('can only copy single URL items', function() { |
51 assertFalse(commandManager.canExecute(Command.COPY, new Set(['11']))); | 53 assertFalse(commandManager.canExecute(Command.COPY, new Set(['11']))); |
52 assertFalse(commandManager.canExecute(Command.COPY, new Set(['11', '13']))); | 54 assertFalse(commandManager.canExecute(Command.COPY, new Set(['11', '13']))); |
53 assertTrue(commandManager.canExecute(Command.COPY, new Set(['13']))); | 55 assertTrue(commandManager.canExecute(Command.COPY, new Set(['13']))); |
54 }); | 56 }); |
55 | 57 |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 assertOpenedTabs(['http://111/', 'http://12/']); | 258 assertOpenedTabs(['http://111/', 'http://12/']); |
257 }); | 259 }); |
258 | 260 |
259 test('control-double click opens full selection', function() { | 261 test('control-double click opens full selection', function() { |
260 customClick(items[0]); | 262 customClick(items[0]); |
261 simulateDoubleClick(items[2], {ctrlKey: true}); | 263 simulateDoubleClick(items[2], {ctrlKey: true}); |
262 | 264 |
263 assertOpenedTabs(['http://111/', 'http://13/']); | 265 assertOpenedTabs(['http://111/', 'http://13/']); |
264 }); | 266 }); |
265 }); | 267 }); |
OLD | NEW |