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

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

Issue 2898303004: [MD Bookmarks] Add toasts. (Closed)
Patch Set: fix nits 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
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-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
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
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 });
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/plural_string_handler.cc ('k') | chrome/test/data/webui/md_bookmarks/md_bookmarks_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698