@@ -495,8 +495,7 @@ describe('HTML', function() {
495
495
} ) ;
496
496
497
497
describe ( 'decodeEntities' , function ( ) {
498
- var handler , text ,
499
- origHiddenPre = window . hiddenPre ;
498
+ var handler , text ;
500
499
501
500
beforeEach ( function ( ) {
502
501
text = '' ;
@@ -511,10 +510,6 @@ describe('decodeEntities', function() {
511
510
module ( 'ngSanitize' ) ;
512
511
} ) ;
513
512
514
- afterEach ( function ( ) {
515
- window . hiddenPre = origHiddenPre ;
516
- } ) ;
517
-
518
513
it ( 'should unescape text' , function ( ) {
519
514
htmlParser ( 'a<div>&</div>c' , handler ) ;
520
515
expect ( text ) . toEqual ( 'a<div>&</div>c' ) ;
@@ -524,34 +519,4 @@ describe('decodeEntities', function() {
524
519
htmlParser ( ' a&b ' , handler ) ;
525
520
expect ( text ) . toEqual ( ' a&b ' ) ;
526
521
} ) ;
527
-
528
- it ( 'should use innerText if textContent is not available (IE<9)' , function ( ) {
529
- window . hiddenPre = {
530
- innerText : 'INNER_TEXT'
531
- } ;
532
- inject ( function ( $sanitize ) {
533
- htmlParser ( '<tag>text</tag>' , handler ) ;
534
- expect ( text ) . toEqual ( 'INNER_TEXT' ) ;
535
- } ) ;
536
- } ) ;
537
- it ( 'should use textContent if available' , function ( ) {
538
- window . hiddenPre = {
539
- textContent : 'TEXT_CONTENT' ,
540
- innerText : 'INNER_TEXT'
541
- } ;
542
- inject ( function ( $sanitize ) {
543
- htmlParser ( '<tag>text</tag>' , handler ) ;
544
- expect ( text ) . toEqual ( 'TEXT_CONTENT' ) ;
545
- } ) ;
546
- } ) ;
547
- it ( 'should use textContent even if empty' , function ( ) {
548
- window . hiddenPre = {
549
- textContent : '' ,
550
- innerText : 'INNER_TEXT'
551
- } ;
552
- inject ( function ( $sanitize ) {
553
- htmlParser ( '<tag>text</tag>' , handler ) ;
554
- expect ( text ) . toEqual ( '' ) ;
555
- } ) ;
556
- } ) ;
557
522
} ) ;
0 commit comments