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

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

Issue 2704983002: MD Bookmarks: Proof-of-concept reimplementation of data storage/binding layer (Closed)
Patch Set: Add doc comments Created 3 years, 10 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/test/data/webui/md_bookmarks/test_store.js ('k') | tools/gritsettings/resource_ids » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/md_bookmarks/test_util.js
diff --git a/chrome/test/data/webui/md_bookmarks/test_util.js b/chrome/test/data/webui/md_bookmarks/test_util.js
index 837841e299809e80939d84538e32b7b5f400dd2e..8073dbb19f950de9db1aa14886cfec2b1d122796 100644
--- a/chrome/test/data/webui/md_bookmarks/test_util.js
+++ b/chrome/test/data/webui/md_bookmarks/test_util.js
@@ -12,17 +12,10 @@ function replaceBody(element) {
}
/**
- * Initialize a tree for UI testing. This performs the same initialization as
- * `setUpStore_` in <bookmarks-store>, but without the need for a store element
- * in the test.
- * @param {BookmarkTreeNode} rootNode
+ * Convert a tree of bookmark nodes into a normalized lookup table of nodes.
*/
-function setupTreeForUITests(rootNode){
- if (!rootNode.path)
- rootNode.path = 'rootNode';
-
- BookmarksStore.generatePaths(rootNode, 0);
- BookmarksStore.initNodes(rootNode);
+function testTree(root) {
+ return bookmarks.util.normalizeNodes(root);
}
/**
@@ -44,7 +37,6 @@ function createFolder(id, children, config) {
}
if (children.length) {
for (var i = 0; i < children.length; i++) {
- children[i].index = i;
children[i].parentId = newFolder.id;
}
}
« no previous file with comments | « chrome/test/data/webui/md_bookmarks/test_store.js ('k') | tools/gritsettings/resource_ids » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698