fix(ngMock): ensure mocked window still provides window.location functionality

This commit is contained in:
Matias Niemelä 2013-06-06 01:09:58 -04:00 committed by Misko Hevery
parent cec4ce28b9
commit 07ef1667db

View file

@ -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);