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

Unified Diff: chrome/test/data/webui/md_bookmarks/command_manager_test.js

Issue 2901463002: [MD Bookmarks] Add undo/redo functionality to MD Bookmarks. (Closed)
Patch Set: fix DEPS Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/md_bookmarks/constants.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/md_bookmarks/command_manager_test.js
diff --git a/chrome/test/data/webui/md_bookmarks/command_manager_test.js b/chrome/test/data/webui/md_bookmarks/command_manager_test.js
index e4d82eada7f8d280359a0ffcf5bd656b2f40c723..a862fbd33df4ada5562e57bc40ffb99fad55bae6 100644
--- a/chrome/test/data/webui/md_bookmarks/command_manager_test.js
+++ b/chrome/test/data/webui/md_bookmarks/command_manager_test.js
@@ -113,6 +113,19 @@ suite('<bookmarks-command-manager>', function() {
commandManager.assertLastCommand('edit', ['11']);
});
+ test('undo and redo commands trigger', function() {
+ var undoModifier = cr.isMac ? 'meta' : 'ctrl';
+ var undoKey = 'z';
+ var redoModifier = cr.isMac ? ['meta', 'shift'] : 'ctrl'
+ var redoKey = cr.isMac ? 'z' : 'y';
+
+ MockInteractions.pressAndReleaseKeyOn(document, '', undoModifier, undoKey);
+ commandManager.assertLastCommand('undo');
+
+ MockInteractions.pressAndReleaseKeyOn(document, '', redoModifier, redoKey);
+ commandManager.assertLastCommand('redo');
+ });
+
test('does not delete children at same time as ancestor', function() {
var lastDelete = null;
chrome.bookmarkManagerPrivate.removeTrees = function(idArray) {
« no previous file with comments | « chrome/browser/resources/md_bookmarks/constants.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698