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

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

Issue 2637023002: [MD Bookmarks] Add routing. (Closed)
Patch Set: First patch fix Created 3 years, 11 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
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 64755a2f3ce1fea25e9bf214a2f6f3a405a74ad3..63c31ad543e4951a91613c7bb8364b86387c33bc 100644
--- a/chrome/test/data/webui/md_bookmarks/test_util.js
+++ b/chrome/test/data/webui/md_bookmarks/test_util.js
@@ -69,3 +69,13 @@ function createItem(id, config) {
}
return newItem;
}
+
+/**
+ * Overrides the chrome.bookmarks.search to pass searchResult into the callback.
+ * @param {Array} searchResult
calamity 2017/01/18 03:37:22 results
angelayang 2017/01/18 06:34:03 Done.
+ */
+function replaceChromeSearch (searchResult) {
calamity 2017/01/18 03:37:22 overrideBookmarksSearch, perhaps?
angelayang 2017/01/18 06:34:03 Done.
+ chrome.bookmarks.search = function(searchTerm, callback) {
+ callback(searchResult);
+ };
+}
calamity 2017/01/18 03:37:22 I like this, but maybe just put it in store_test.j
angelayang 2017/01/18 06:34:03 Done.

Powered by Google App Engine
This is Rietveld 408576698