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

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

Issue 2962923003: [MD Bookmarks] Add drag and drop indicator. (Closed)
Patch Set: Created 3 years, 5 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/ui/webui/md_bookmarks/md_bookmarks_ui.cc ('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/dnd_manager_test.js
diff --git a/chrome/test/data/webui/md_bookmarks/dnd_manager_test.js b/chrome/test/data/webui/md_bookmarks/dnd_manager_test.js
index 2c71a907403a85e092a2b06111177c0c12fa34ee..5da049d4cf2af598f992106b61cd9635761fe65a 100644
--- a/chrome/test/data/webui/md_bookmarks/dnd_manager_test.js
+++ b/chrome/test/data/webui/md_bookmarks/dnd_manager_test.js
@@ -527,4 +527,21 @@ suite('drag and drop', function() {
assertEquals(
DropPosition.NONE, dndManager.calculateValidDropPositions_(dragTarget));
});
+
+ test('ensure drag and drop chip shows', function() {
+ var dragElement = getListItem('13');
+ var dragTarget = getFolderNode('2');
+ dispatchDragEvent('dragstart', dragElement);
+ dndManager.dragInfo_.handleChromeDragEnter(createDragData(draggedIds));
+
+ dispatchDragEvent('dragover', dragTarget, {x: 50, y: 80});
+ assertTrue(!!dndManager.chip_);
+ var dndChip = dndManager.dndChip;
+ assertEquals('50px', dndChip.style.getPropertyValue('--mouse-x'));
+ assertEquals('80px', dndChip.style.getPropertyValue('--mouse-y'));
+ assertTrue(dndChip.showing_);
+
+ dispatchDragEvent('dragend', dragElement);
+ assertFalse(dndChip.showing_);
+ });
});
« no previous file with comments | « chrome/browser/ui/webui/md_bookmarks/md_bookmarks_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698