Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 3125c3a

Browse files
committed
v1.6.9-build.5526+sha.96dd35a
1 parent 8ff5b56 commit 3125c3a

File tree

3 files changed

+16
-51
lines changed

3 files changed

+16
-51
lines changed

angular-mocks.js

Lines changed: 13 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.6.8
2+
* @license AngularJS v1.6.9-build.5526+sha.96dd35a
33
* (c) 2010-2017 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
@@ -803,7 +803,7 @@ angular.mock.TzDate.prototype = Date.prototype;
803803
* You need to require the `ngAnimateMock` module in your test suite for instance `beforeEach(module('ngAnimateMock'))`
804804
*/
805805
angular.mock.animate = angular.module('ngAnimateMock', ['ng'])
806-
.info({ angularVersion: '1.6.8' })
806+
.info({ angularVersion: '1.6.9-build.5526+sha.96dd35a' })
807807

808808
.config(['$provide', function($provide) {
809809

@@ -969,7 +969,7 @@ angular.mock.animate = angular.module('ngAnimateMock', ['ng'])
969969
*
970970
* *NOTE*: This is not an injectable instance, just a globally available function.
971971
*
972-
* Method for serializing common angular objects (scope, elements, etc..) into strings.
972+
* Method for serializing common AngularJS objects (scope, elements, etc..) into strings.
973973
* It is useful for logging objects to the console when debugging.
974974
*
975975
* @param {*} object - any object to turn into string.
@@ -1051,7 +1051,7 @@ angular.mock.dump = function(object) {
10511051
* This mock implementation can be used to respond with static or dynamic responses via the
10521052
* `expect` and `when` apis and their shortcuts (`expectGET`, `whenPOST`, etc).
10531053
*
1054-
* When an Angular application needs some data from a server, it calls the $http service, which
1054+
* When an AngularJS application needs some data from a server, it calls the $http service, which
10551055
* sends the request to a real server using $httpBackend service. With dependency injection, it is
10561056
* easy to inject $httpBackend mock (which has the same API as $httpBackend) and use it to verify
10571057
* the requests and respond with some testing data without sending a request to a real server.
@@ -2097,13 +2097,13 @@ function MockXhr() {
20972097
var header = this.$$respHeaders[name];
20982098
if (header) return header;
20992099

2100-
name = angular.lowercase(name);
2100+
name = angular.$$lowercase(name);
21012101
header = this.$$respHeaders[name];
21022102
if (header) return header;
21032103

21042104
header = undefined;
21052105
angular.forEach(this.$$respHeaders, function(headerVal, headerName) {
2106-
if (!header && angular.lowercase(headerName) === name) header = headerVal;
2106+
if (!header && angular.$$lowercase(headerName) === name) header = headerVal;
21072107
});
21082108
return header;
21092109
};
@@ -2120,7 +2120,7 @@ function MockXhr() {
21202120
this.abort = angular.noop;
21212121

21222122
// This section simulates the events on a real XHR object (and the upload object)
2123-
// When we are testing $httpBackend (inside the angular project) we make partial use of this
2123+
// When we are testing $httpBackend (inside the AngularJS project) we make partial use of this
21242124
// but store the events directly ourselves on `$$events`, instead of going through the `addEventListener`
21252125
this.$$events = {};
21262126
this.addEventListener = function(name, listener) {
@@ -2231,11 +2231,6 @@ angular.mock.$RootElementProvider = function() {
22312231
* A decorator for {@link ng.$controller} with additional `bindings` parameter, useful when testing
22322232
* controllers of directives that use {@link $compile#-bindtocontroller- `bindToController`}.
22332233
*
2234-
* Depending on the value of
2235-
* {@link ng.$compileProvider#preAssignBindingsEnabled `preAssignBindingsEnabled()`}, the properties
2236-
* will be bound before or after invoking the constructor.
2237-
*
2238-
*
22392234
* ## Example
22402235
*
22412236
* ```js
@@ -2281,8 +2276,6 @@ angular.mock.$RootElementProvider = function() {
22812276
*
22822277
* * check if a controller with given name is registered via `$controllerProvider`
22832278
* * check if evaluating the string on the current scope returns a constructor
2284-
* * if $controllerProvider#allowGlobals, check `window[constructor]` on the global
2285-
* `window` object (deprecated, not recommended)
22862279
*
22872280
* The string can use the `controller as property` syntax, where the controller instance is published
22882281
* as the specified property on the `scope`; the `scope` must be injected into `locals` param for this
@@ -2293,22 +2286,13 @@ angular.mock.$RootElementProvider = function() {
22932286
* the `bindToController` feature and simplify certain kinds of tests.
22942287
* @return {Object} Instance of given controller.
22952288
*/
2296-
function createControllerDecorator(compileProvider) {
2289+
function createControllerDecorator() {
22972290
angular.mock.$ControllerDecorator = ['$delegate', function($delegate) {
22982291
return function(expression, locals, later, ident) {
22992292
if (later && typeof later === 'object') {
2300-
var preAssignBindingsEnabled = compileProvider.preAssignBindingsEnabled();
2301-
23022293
var instantiate = $delegate(expression, locals, true, ident);
2303-
if (preAssignBindingsEnabled) {
2304-
angular.extend(instantiate.instance, later);
2305-
}
2306-
23072294
var instance = instantiate();
2308-
if (!preAssignBindingsEnabled || instance !== instantiate.instance) {
2309-
angular.extend(instance, later);
2310-
}
2311-
2295+
angular.extend(instance, later);
23122296
return instance;
23132297
}
23142298
return $delegate(expression, locals, later, ident);
@@ -2426,7 +2410,7 @@ angular.module('ngMock', ['ng']).provider({
24262410
$provide.decorator('$rootScope', angular.mock.$RootScopeDecorator);
24272411
$provide.decorator('$controller', createControllerDecorator($compileProvider));
24282412
$provide.decorator('$httpBackend', angular.mock.$httpBackendDecorator);
2429-
}]).info({ angularVersion: '1.6.8' });
2413+
}]).info({ angularVersion: '1.6.9-build.5526+sha.96dd35a' });
24302414

24312415
/**
24322416
* @ngdoc module
@@ -2435,13 +2419,13 @@ angular.module('ngMock', ['ng']).provider({
24352419
* @packageName angular-mocks
24362420
* @description
24372421
*
2438-
* The `ngMockE2E` is an angular module which contains mocks suitable for end-to-end testing.
2422+
* The `ngMockE2E` is an AngularJS module which contains mocks suitable for end-to-end testing.
24392423
* Currently there is only one mock present in this module -
24402424
* the {@link ngMockE2E.$httpBackend e2e $httpBackend} mock.
24412425
*/
24422426
angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {
24432427
$provide.decorator('$httpBackend', angular.mock.e2e.$httpBackendDecorator);
2444-
}]).info({ angularVersion: '1.6.8' });
2428+
}]).info({ angularVersion: '1.6.9-build.5526+sha.96dd35a' });
24452429

24462430
/**
24472431
* @ngdoc service
@@ -3368,30 +3352,11 @@ angular.mock.$RootScopeDecorator = ['$delegate', function($delegate) {
33683352

33693353
if (!evnt) return;
33703354

3371-
var originalPreventDefault = evnt.preventDefault,
3372-
appWindow = element.ownerDocument.defaultView,
3373-
fakeProcessDefault = true,
3374-
finalProcessDefault,
3375-
angular = appWindow.angular || {};
3376-
3377-
// igor: temporary fix for https://bugzilla.mozilla.org/show_bug.cgi?id=684208
3378-
angular['ff-684208-preventDefault'] = false;
3379-
evnt.preventDefault = function() {
3380-
fakeProcessDefault = false;
3381-
return originalPreventDefault.apply(evnt, arguments);
3382-
};
3383-
33843355
if (!eventData.bubbles || supportsEventBubblingInDetachedTree() || isAttachedToDocument(element)) {
3385-
element.dispatchEvent(evnt);
3356+
return element.dispatchEvent(evnt);
33863357
} else {
33873358
triggerForPath(element, evnt);
33883359
}
3389-
3390-
finalProcessDefault = !(angular['ff-684208-preventDefault'] || !fakeProcessDefault);
3391-
3392-
delete angular['ff-684208-preventDefault'];
3393-
3394-
return finalProcessDefault;
33953360
};
33963361

33973362
function supportsTouchEvents() {

bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "angular-mocks",
3-
"version": "1.6.8",
3+
"version": "1.6.9-build.5526+sha.96dd35a",
44
"license": "MIT",
55
"main": "./angular-mocks.js",
66
"ignore": [],
77
"dependencies": {
8-
"angular": "1.6.8"
8+
"angular": "1.6.9-build.5526+sha.96dd35a"
99
}
1010
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-mocks",
3-
"version": "1.6.8",
3+
"version": "1.6.9-build.5526+sha.96dd35a",
44
"description": "AngularJS mocks for testing",
55
"main": "angular-mocks.js",
66
"scripts": {

0 commit comments

Comments
 (0)