From 221ddd46b0eddba1921f8254c71218d3a8b3c5fe Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sat, 5 Feb 2011 18:29:58 -0500 Subject: Fix some option validators. Add tests. --- common/content/bookmarks.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'common/content/bookmarks.js') diff --git a/common/content/bookmarks.js b/common/content/bookmarks.js index 52c1ecee..d49016c5 100644 --- a/common/content/bookmarks.js +++ b/common/content/bookmarks.js @@ -633,12 +633,12 @@ var Bookmarks = Module("bookmarks", { }; completion.searchEngine = function searchEngine(context, suggest) { - let engines = services.browserSearch.getEngines({}); + context.title = ["Suggest Engine", "Description"]; + context.keys = { text: "keyword", description: "title", icon: "icon" }; + context.completions = values(bookmarks.searchEngines); if (suggest) - engines = engines.filter(function (e) e.supportsResponseType("application/x-suggestions+json")); + context.filters.push(function ({ item }) item.supportsResponseType("application/x-suggestions+json")); - context.title = ["Suggest Engine", "Description"]; - context.completions = engines.map(function (e) [e.alias, e.description]); }; completion.searchEngineSuggest = function searchEngineSuggest(context, engineAliases, kludge) { -- cgit v1.2.3