1
1
/**
2
- * @license AngularJS v1.6.10
2
+ * @license AngularJS v1.7.0-rc.0
3
3
* (c) 2010-2018 Google, Inc. http://angularjs.org
4
4
* License: MIT
5
5
*/
@@ -803,7 +803,7 @@ angular.mock.TzDate.prototype = Date.prototype;
803
803
* You need to require the `ngAnimateMock` module in your test suite for instance `beforeEach(module('ngAnimateMock'))`
804
804
*/
805
805
angular . mock . animate = angular . module ( 'ngAnimateMock' , [ 'ng' ] )
806
- . info ( { angularVersion : '1.6.10 ' } )
806
+ . info ( { angularVersion : '1.7.0-rc.0 ' } )
807
807
808
808
. config ( [ '$provide' , function ( $provide ) {
809
809
@@ -2101,13 +2101,13 @@ function MockXhr() {
2101
2101
var header = this . $$respHeaders [ name ] ;
2102
2102
if ( header ) return header ;
2103
2103
2104
- name = angular . lowercase ( name ) ;
2104
+ name = angular . $$ lowercase( name ) ;
2105
2105
header = this . $$respHeaders [ name ] ;
2106
2106
if ( header ) return header ;
2107
2107
2108
2108
header = undefined ;
2109
2109
angular . forEach ( this . $$respHeaders , function ( headerVal , headerName ) {
2110
- if ( ! header && angular . lowercase ( headerName ) === name ) header = headerVal ;
2110
+ if ( ! header && angular . $$ lowercase( headerName ) === name ) header = headerVal ;
2111
2111
} ) ;
2112
2112
return header ;
2113
2113
} ;
@@ -2239,11 +2239,6 @@ angular.mock.$RootElementProvider = function() {
2239
2239
* A decorator for {@link ng.$controller} with additional `bindings` parameter, useful when testing
2240
2240
* controllers of directives that use {@link $compile#-bindtocontroller- `bindToController`}.
2241
2241
*
2242
- * Depending on the value of
2243
- * {@link ng.$compileProvider#preAssignBindingsEnabled `preAssignBindingsEnabled()`}, the properties
2244
- * will be bound before or after invoking the constructor.
2245
- *
2246
- *
2247
2242
* ## Example
2248
2243
*
2249
2244
* ```js
@@ -2289,8 +2284,6 @@ angular.mock.$RootElementProvider = function() {
2289
2284
*
2290
2285
* * check if a controller with given name is registered via `$controllerProvider`
2291
2286
* * check if evaluating the string on the current scope returns a constructor
2292
- * * if $controllerProvider#allowGlobals, check `window[constructor]` on the global
2293
- * `window` object (deprecated, not recommended)
2294
2287
*
2295
2288
* The string can use the `controller as property` syntax, where the controller instance is published
2296
2289
* as the specified property on the `scope`; the `scope` must be injected into `locals` param for this
@@ -2301,22 +2294,13 @@ angular.mock.$RootElementProvider = function() {
2301
2294
* the `bindToController` feature and simplify certain kinds of tests.
2302
2295
* @return {Object } Instance of given controller.
2303
2296
*/
2304
- function createControllerDecorator ( compileProvider ) {
2297
+ function createControllerDecorator ( ) {
2305
2298
angular . mock . $ControllerDecorator = [ '$delegate' , function ( $delegate ) {
2306
2299
return function ( expression , locals , later , ident ) {
2307
2300
if ( later && typeof later === 'object' ) {
2308
- var preAssignBindingsEnabled = compileProvider . preAssignBindingsEnabled ( ) ;
2309
-
2310
2301
var instantiate = $delegate ( expression , locals , true , ident ) ;
2311
- if ( preAssignBindingsEnabled ) {
2312
- angular . extend ( instantiate . instance , later ) ;
2313
- }
2314
-
2315
2302
var instance = instantiate ( ) ;
2316
- if ( ! preAssignBindingsEnabled || instance !== instantiate . instance ) {
2317
- angular . extend ( instance , later ) ;
2318
- }
2319
-
2303
+ angular . extend ( instance , later ) ;
2320
2304
return instance ;
2321
2305
}
2322
2306
return $delegate ( expression , locals , later , ident ) ;
@@ -2434,7 +2418,7 @@ angular.module('ngMock', ['ng']).provider({
2434
2418
$provide . decorator ( '$rootScope' , angular . mock . $RootScopeDecorator ) ;
2435
2419
$provide . decorator ( '$controller' , createControllerDecorator ( $compileProvider ) ) ;
2436
2420
$provide . decorator ( '$httpBackend' , angular . mock . $httpBackendDecorator ) ;
2437
- } ] ) . info ( { angularVersion : '1.6.10 ' } ) ;
2421
+ } ] ) . info ( { angularVersion : '1.7.0-rc.0 ' } ) ;
2438
2422
2439
2423
/**
2440
2424
* @ngdoc module
@@ -2449,7 +2433,7 @@ angular.module('ngMock', ['ng']).provider({
2449
2433
*/
2450
2434
angular . module ( 'ngMockE2E' , [ 'ng' ] ) . config ( [ '$provide' , function ( $provide ) {
2451
2435
$provide . decorator ( '$httpBackend' , angular . mock . e2e . $httpBackendDecorator ) ;
2452
- } ] ) . info ( { angularVersion : '1.6.10 ' } ) ;
2436
+ } ] ) . info ( { angularVersion : '1.7.0-rc.0 ' } ) ;
2453
2437
2454
2438
/**
2455
2439
* @ngdoc service
@@ -3394,30 +3378,11 @@ angular.mock.$RootScopeDecorator = ['$delegate', function($delegate) {
3394
3378
3395
3379
if ( ! evnt ) return ;
3396
3380
3397
- var originalPreventDefault = evnt . preventDefault ,
3398
- appWindow = element . ownerDocument . defaultView ,
3399
- fakeProcessDefault = true ,
3400
- finalProcessDefault ,
3401
- angular = appWindow . angular || { } ;
3402
-
3403
- // igor: temporary fix for https://bugzilla.mozilla.org/show_bug.cgi?id=684208
3404
- angular [ 'ff-684208-preventDefault' ] = false ;
3405
- evnt . preventDefault = function ( ) {
3406
- fakeProcessDefault = false ;
3407
- return originalPreventDefault . apply ( evnt , arguments ) ;
3408
- } ;
3409
-
3410
3381
if ( ! eventData . bubbles || supportsEventBubblingInDetachedTree ( ) || isAttachedToDocument ( element ) ) {
3411
- element . dispatchEvent ( evnt ) ;
3382
+ return element . dispatchEvent ( evnt ) ;
3412
3383
} else {
3413
3384
triggerForPath ( element , evnt ) ;
3414
3385
}
3415
-
3416
- finalProcessDefault = ! ( angular [ 'ff-684208-preventDefault' ] || ! fakeProcessDefault ) ;
3417
-
3418
- delete angular [ 'ff-684208-preventDefault' ] ;
3419
-
3420
- return finalProcessDefault ;
3421
3386
} ;
3422
3387
3423
3388
function supportsTouchEvents ( ) {
0 commit comments