blob: ab3638b1e1695af9c664aa6abe32f89373bdea78 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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();
});
|