| Index: chrome/test/data/webui/md_bookmarks/store_test.js
|
| diff --git a/chrome/test/data/webui/md_bookmarks/store_test.js b/chrome/test/data/webui/md_bookmarks/store_test.js
|
| index 3f7470cf909a51deada4933263bbc4c6a1eaadf2..0d3c8b65bdf4471f3e6b3a2de4e1c9b9bc5138f6 100644
|
| --- a/chrome/test/data/webui/md_bookmarks/store_test.js
|
| +++ b/chrome/test/data/webui/md_bookmarks/store_test.js
|
| @@ -251,6 +251,29 @@ suite('<bookmarks-store>', function() {
|
| assertEquals('http://www.google.com', store.idToNodeMap_['2'].url);
|
| });
|
|
|
| + test('adding a folder updates tree with new node', function() {
|
| + chrome.bookmarks.create = function(info) {};
|
| +
|
| + // Create a bookmark.
|
| + var parent = store.idToNodeMap_['8'];
|
| + var id = '9';
|
| + store.onBookmarkCreated_(id, createItem(id, {parentId: parent.id}));
|
| + var lastIndex = parent.children.length - 1;
|
| + var node = store.idToNodeMap_[id];
|
| + assertEquals(node, parent.children[lastIndex]);
|
| + assertEquals(parent.path + '.children.#' + lastIndex, node.path);
|
| + assertTrue('url' in node);
|
| +
|
| + // Create a folder.
|
| + var id = '10';
|
| + store.onBookmarkCreated_(id, createFolder(id, [], {parentId: parent.id}));
|
| + lastIndex = parent.children.length - 1;
|
| + node = store.idToNodeMap_[id];
|
| + assertEquals(node, parent.children[lastIndex]);
|
| + assertEquals(parent.path + '.children.#' + lastIndex, node.path);
|
| + assertFalse('url' in node);
|
| + });
|
| +
|
| //////////////////////////////////////////////////////////////////////////////
|
| // search tests:
|
|
|
|
|