diff options
| author | Misko Hevery | 2010-09-22 13:24:40 +0200 | 
|---|---|---|
| committer | Misko Hevery | 2010-09-22 16:17:44 +0200 | 
| commit | 0649009624e8e7bd6fb39537f62c6f00facbfb16 (patch) | |
| tree | e85077e148220ce75926bffce2d1e7daf8069945 /test/ScenarioSpec.js | |
| parent | eefb920d0e0345485a8eb120aeecc3b1aa9f6719 (diff) | |
| download | angular.js-0649009624e8e7bd6fb39537f62c6f00facbfb16.tar.bz2 | |
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
Diffstat (limited to 'test/ScenarioSpec.js')
| -rw-r--r-- | test/ScenarioSpec.js | 4 | 
1 files changed, 2 insertions, 2 deletions
| 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("<div>{{$location}}</div>"); -    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');    });  }); | 
