aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatias Niemelä2013-06-06 01:09:58 -0400
committerMisko Hevery2013-06-17 21:23:22 -0700
commit07ef1667db632d0fd75472f30343255edcebf43b (patch)
treef16a3722a17c14ff221859116174032f60b1eb09 /src
parentcec4ce28b93793caba75c7bab009d30bc97b6146 (diff)
downloadangular.js-07ef1667db632d0fd75472f30343255edcebf43b.tar.bz2
fix(ngMock): ensure mocked window still provides window.location functionality
Diffstat (limited to 'src')
-rw-r--r--src/ngMock/angular-mocks.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ngMock/angular-mocks.js b/src/ngMock/angular-mocks.js
index 1b69dac3..a35e0f2f 100644
--- a/src/ngMock/angular-mocks.js
+++ b/src/ngMock/angular-mocks.js
@@ -640,6 +640,7 @@ angular.mock.createMockWindow = function() {
var mockWindow = {};
var setTimeoutQueue = [];
+ mockWindow.location = window.location;
mockWindow.document = window.document;
mockWindow.getComputedStyle = angular.bind(window, window.getComputedStyle);
mockWindow.scrollTo = angular.bind(window, window.scrollTo);