aboutsummaryrefslogtreecommitdiffstats
path: root/test/angular-mocks.js
diff options
context:
space:
mode:
authorMisko Hevery2010-04-05 11:46:53 -0700
committerMisko Hevery2010-04-05 11:46:53 -0700
commit7a4b48020688060debe9cb0f9c17615d7585cbe7 (patch)
tree48a5b1d8cf92bb272028a106ab9ea3ec16f477a2 /test/angular-mocks.js
parent4bfa4e230d5ebdd582068effe7f4f1b60c43093a (diff)
downloadangular.js-7a4b48020688060debe9cb0f9c17615d7585cbe7.tar.bz2
added ng:switch widget
Diffstat (limited to 'test/angular-mocks.js')
-rw-r--r--test/angular-mocks.js26
1 files changed, 26 insertions, 0 deletions
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();
+});