@@ -262,7 +262,9 @@ describe('SCE', function() {
262262 $sceDelegateProvider . resourceUrlBlacklist ( cfg . blackList ) ;
263263 }
264264 } ) ;
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 ) ;
266268 }
267269 }
268270
@@ -288,15 +290,13 @@ describe('SCE', function() {
288290 '$sce' , 'insecurl' , 'Blocked loading resource from url not allowed by $sceDelegate policy. URL: foo' ) ;
289291 } ) ) ;
290292
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+ } ) ;
300300
301301 describe ( 'adjustMatcher' , function ( ) {
302302 it ( 'should rewrite regex into regex and add ^ & $ on either end' , function ( ) {
0 commit comments