From 4ada22e85dcd061fa806a5fe72a9dc3f1cfe0442 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Tue, 9 Feb 2016 15:28:50 +0000 Subject: BgUtils; move tabRecency to bg_tiles.coffee. Certain background-page utilities are actually shared, and are therefore best placed in place that reflects that. Here, tabRecency is moved to the new gb_utils.coffee in preparation for implementing a go-to-previous-tab command. In particular, it is no longer appropriate that tabRecency be embedded within the completion code. logMessage() from main.coffee is also a candidate for moving to bg_utils.coffee. --- tests/unit_tests/completion_test.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/unit_tests/completion_test.coffee b/tests/unit_tests/completion_test.coffee index 9ce0a466..3bb187fd 100644 --- a/tests/unit_tests/completion_test.coffee +++ b/tests/unit_tests/completion_test.coffee @@ -1,5 +1,6 @@ require "./test_helper.js" extend(global, require "../../lib/utils.js") +extend(global, require "../../background_scripts/bg_utils.js") extend(global, require "../../background_scripts/completion_engines.js") extend(global, require "../../background_scripts/completion.js") extend global, require "./test_chrome_stubs.js" @@ -411,7 +412,7 @@ fakeTimeDeltaElapsing = -> context "TabRecency", setup -> - @tabRecency = new TabRecency() + @tabRecency = BgUtils.tabRecency fakeTimeDeltaElapsing = => if @tabRecency.lastVisitedTime? -- cgit v1.2.3