Index: chrome/test/data/webui/md_bookmarks/reducers_test.js |
diff --git a/chrome/test/data/webui/md_bookmarks/reducers_test.js b/chrome/test/data/webui/md_bookmarks/reducers_test.js |
index a23c27ec08ea15f8ca3b27182a9b6b40876fe77b..15fae4d3f548592df6c48a2b4ba6569d50ea5cbe 100644 |
--- a/chrome/test/data/webui/md_bookmarks/reducers_test.js |
+++ b/chrome/test/data/webui/md_bookmarks/reducers_test.js |
@@ -106,16 +106,16 @@ suite('selection state', function() { |
}); |
test('deselects items when they are deleted', function() { |
- var nodeMap = testTree(createFolder('0', [ |
- createFolder( |
- '1', |
- [ |
- createItem('2'), |
- createItem('3'), |
- createItem('4'), |
- ]), |
- createItem('5'), |
- ])); |
+ var nodeMap = testTree( |
+ createFolder( |
+ '1', |
+ [ |
+ createItem('2'), |
+ createItem('3'), |
+ createItem('4'), |
+ ]), |
+ createItem('5'), |
+ ); |
action = select(['2', '4', '5'], '4', true, false); |
selection = bookmarks.SelectionState.updateSelection(selection, action); |
@@ -126,6 +126,24 @@ suite('selection state', function() { |
assertDeepEquals(['5'], normalizeSet(selection.items)); |
assertEquals(null, selection.anchor); |
}); |
+ |
+ test('deselects items when they are moved to a different folder', function() { |
+ var nodeMap = testTree( |
+ createFolder('1', []), |
+ createItem('2'), |
+ createItem('3'), |
+ ); |
+ |
+ action = select(['2', '3'], '2', true, false); |
+ selection = bookmarks.SelectionState.updateSelection(selection, action); |
+ |
+ // Move item '2' from the 1st item in '0' to the 0th item in '1'. |
+ action = bookmarks.actions.moveBookmark('2', '1', 0, '0', 1); |
calamity
2017/06/22 05:35:34
I feel like we should have made these objects. It'
tsergeant
2017/06/22 06:59:09
Do you mean in general or just in this test?
This
|
+ selection = bookmarks.SelectionState.updateSelection(selection, action); |
+ |
+ assertDeepEquals(['3'], normalizeSet(selection.items)); |
+ assertEquals(null, selection.anchor); |
+ }); |
}); |
suite('closed folder state', function() { |