@@ -262,7 +262,9 @@ describe('SCE', function() {
262
262
$sceDelegateProvider . resourceUrlBlacklist ( cfg . blackList ) ;
263
263
}
264
264
} ) ;
265
- inject ( testFn ) ;
265
+ // This needs to be angular.mock.inject even though it's === window.inject.
266
+ // Ref: https://github.com/angular/angular.js/pull/4221#/issuecomment-25515813
267
+ angular . mock . inject ( testFn ) ;
266
268
}
267
269
}
268
270
@@ -288,15 +290,13 @@ describe('SCE', function() {
288
290
'$sce' , 'insecurl' , 'Blocked loading resource from url not allowed by $sceDelegate policy. URL: foo' ) ;
289
291
} ) ) ;
290
292
291
- if ( ! msie || msie > 8 ) {
292
- it ( 'should not accept unknown matcher type' , function ( ) {
293
- expect ( function ( ) {
294
- runTest ( { whiteList : [ { } ] } , null ) ( ) ;
295
- } ) . toThrowMinErr ( '$injector' , 'modulerr' , new RegExp (
296
- / F a i l e d t o i n s t a n t i a t e m o d u l e f u n c t i o n ? \( \$ s c e D e l e g a t e P r o v i d e r \) d u e t o : \n / . source +
297
- / [ ^ [ ] * \[ \$ s c e : i m a t c h e r \] M a t c h e r s m a y o n l y b e " s e l f " , s t r i n g p a t t e r n s o r R e g E x p o b j e c t s / . source ) ) ;
298
- } ) ;
299
- }
293
+ it ( 'should not accept unknown matcher type' , function ( ) {
294
+ expect ( function ( ) {
295
+ runTest ( { whiteList : [ { } ] } , null ) ( ) ;
296
+ } ) . toThrowMinErr ( '$injector' , 'modulerr' , new RegExp (
297
+ / F a i l e d t o i n s t a n t i a t e m o d u l e f u n c t i o n ? \( \$ s c e D e l e g a t e P r o v i d e r \) d u e t o : \n / . source +
298
+ / [ ^ [ ] * \[ \$ s c e : i m a t c h e r \] M a t c h e r s m a y o n l y b e " s e l f " , s t r i n g p a t t e r n s o r R e g E x p o b j e c t s / . source ) ) ;
299
+ } ) ;
300
300
301
301
describe ( 'adjustMatcher' , function ( ) {
302
302
it ( 'should rewrite regex into regex and add ^ & $ on either end' , function ( ) {
0 commit comments