@@ -1444,9 +1444,9 @@ describe('Scope', function() {
1444
1444
expect ( childScope . $$asyncQueue ) . toBe ( $rootScope . $$asyncQueue ) ;
1445
1445
expect ( isolateScope . $$asyncQueue ) . toBeUndefined ( ) ;
1446
1446
expect ( $rootScope . $$asyncQueue ) . toEqual ( [
1447
- { scope : $rootScope , expression : $parse ( 'rootExpression' ) , locals : undefined } ,
1448
- { scope : childScope , expression : $parse ( 'childExpression' ) , locals : undefined } ,
1449
- { scope : isolateScope , expression : $parse ( 'isolateExpression' ) , locals : undefined }
1447
+ { scope : $rootScope , fn : $parse ( 'rootExpression' ) , locals : undefined } ,
1448
+ { scope : childScope , fn : $parse ( 'childExpression' ) , locals : undefined } ,
1449
+ { scope : isolateScope , fn : $parse ( 'isolateExpression' ) , locals : undefined }
1450
1450
] ) ;
1451
1451
} ) ) ;
1452
1452
@@ -1499,6 +1499,14 @@ describe('Scope', function() {
1499
1499
expect ( log ) . toEqual ( [ 'eval-ed 1!' , 'eval-ed 2!' ] ) ;
1500
1500
} ) ;
1501
1501
} ) ;
1502
+
1503
+ it ( 'should not pass anything as `this` to scheduled functions' , inject ( function ( $rootScope ) {
1504
+ var this1 = { } ;
1505
+ var this2 = ( function ( ) { return this ; } ) ( ) ;
1506
+ $rootScope . $evalAsync ( function ( ) { this1 = this ; } ) ;
1507
+ $rootScope . $digest ( ) ;
1508
+ expect ( this1 ) . toEqual ( this2 ) ;
1509
+ } ) ) ;
1502
1510
} ) ;
1503
1511
1504
1512
0 commit comments