From 0649009624e8e7bd6fb39537f62c6f00facbfb16 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Wed, 22 Sep 2010 13:24:40 +0200 Subject: Refactored the Browser: - change from using prototype to inner functions to help with better compression - removed watchers (url/cookie) and introduced a poller concept - moved the checking of URL and cookie into services which register with poolers Benefits: - Smaller minified file - can call $browser.poll() from tests to simulate polling - single place where setTimeout needs to be tested - More testable $browser --- test/ScenarioSpec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/ScenarioSpec.js') diff --git a/test/ScenarioSpec.js b/test/ScenarioSpec.js index 7ea3192d..ede49a49 100644 --- a/test/ScenarioSpec.js +++ b/test/ScenarioSpec.js @@ -42,10 +42,10 @@ describe("ScenarioSpec: configuration", function(){ it("should take location object", function(){ var url = "http://server/#?book=moby"; var scope = compile("
{{$location}}
"); - var $location = scope.$get('$location'); + var $location = scope.$location; expect($location.hashSearch.book).toBeUndefined(); scope.$browser.setUrl(url); - scope.$browser.fireUrlWatchers(); + scope.$browser.poll(); expect($location.hashSearch.book).toEqual('moby'); }); }); -- cgit v1.2.3