From 7a4b48020688060debe9cb0f9c17615d7585cbe7 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Mon, 5 Apr 2010 11:46:53 -0700 Subject: added ng:switch widget --- test/angular-mocks.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 test/angular-mocks.js (limited to 'test/angular-mocks.js') diff --git a/test/angular-mocks.js b/test/angular-mocks.js new file mode 100644 index 00000000..ab3638b1 --- /dev/null +++ b/test/angular-mocks.js @@ -0,0 +1,26 @@ + +function MockBrowser() { + this.url = "http://server"; + this.watches = []; +} +MockBrowser.prototype = { + xhr: function(method, url, callback) { + + }, + + getUrl: function(){ + return this.url; + }, + + setUrl: function(url){ + this.url = url; + }, + + watchUrl: function(fn) { + this.watches.push(fn); + } +}; + +angular.service('$browser', function(){ + return new MockBrowser(); +}); -- cgit v1.2.3