From 24a6217f26911ba4e934f4a7bff8bcd30c227163 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sun, 23 Oct 2016 16:50:48 +0100 Subject: Move SearchEngines to bg-utils.coffee. `SearchEngines` was previously in `utils.coffee`, which means it was loaded in *every* content frame. This is unnecessary, since it is only used on the background page. So this PR moves it there. Also: - Simplify some unnecessarily complex logic in `vomnibar.coffee`. - Re-use `Utils.parseLines()` to parse the custom search engine configuation text. --- tests/dom_tests/vomnibar_test.coffee | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/dom_tests/vomnibar_test.coffee b/tests/dom_tests/vomnibar_test.coffee index 501fd5dd..a8a02f2b 100644 --- a/tests/dom_tests/vomnibar_test.coffee +++ b/tests/dom_tests/vomnibar_test.coffee @@ -1,5 +1,4 @@ vomnibarFrame = null -SearchEngines.refresh "" Vomnibar.init() context "Keep selection within bounds", @@ -30,7 +29,7 @@ context "Keep selection within bounds", Vomnibar.vomnibarUI.hide() should "set selection to position -1 for omni completion by default", -> - Vomnibar.activate() + Vomnibar.activate 0, options: {} ui = vomnibarFrame.Vomnibar.vomnibarUI @completions = [] @@ -62,7 +61,7 @@ context "Keep selection within bounds", assert.equal -1, ui.selection should "keep selection within bounds", -> - Vomnibar.activate() + Vomnibar.activate 0, options: {} ui = vomnibarFrame.Vomnibar.vomnibarUI @completions = [] -- cgit v1.2.3