@@ -11,10 +11,6 @@ describe('scriptDirective', function() {
1111
1212 it ( 'should populate $templateCache with contents of a ng-template script element' , inject (
1313 function ( $compile , $templateCache ) {
14- if ( msie <= 8 ) return ;
15- // in ie8 it is not possible to create a script tag with the right content.
16- // it always comes up as empty. I was trying to set the text of the
17- // script tag, but that did not work either, so I gave up.
1814 $compile ( '<div>foo' +
1915 '<script id="/ignore">ignore me</script>' +
2016 '<script type="text/ng-template" id="/myTemplate.html"><x>{{y}}</x></script>' +
@@ -26,19 +22,18 @@ describe('scriptDirective', function() {
2622
2723
2824 it ( 'should not compile scripts' , inject ( function ( $compile , $templateCache , $rootScope ) {
29- if ( msie <= 8 ) return ; // see above
30-
3125 var doc = jqLite ( '<div></div>' ) ;
32- // jQuery is too smart and removes
33- doc [ 0 ] . innerHTML = '<script type="text/javascript">some {{binding}}</script>' +
34- '<script type="text/ng-template" id="/some">other {{binding}}</script>' ;
26+ // jQuery is too smart and removes script tags
27+ doc [ 0 ] . innerHTML = 'foo' +
28+ '<script type="text/javascript">some {{binding}}</script>' +
29+ '<script type="text/ng-template" id="/some">other {{binding}}</script>' ;
3530
3631 $compile ( doc ) ( $rootScope ) ;
3732 $rootScope . $digest ( ) ;
3833
3934 var scripts = doc . find ( 'script' ) ;
40- expect ( scripts . eq ( 0 ) . text ( ) ) . toBe ( 'some {{binding}}' ) ;
41- expect ( scripts . eq ( 1 ) . text ( ) ) . toBe ( 'other {{binding}}' ) ;
35+ expect ( scripts . eq ( 0 ) [ 0 ] . text ) . toBe ( 'some {{binding}}' ) ;
36+ expect ( scripts . eq ( 1 ) [ 0 ] . text ) . toBe ( 'other {{binding}}' ) ;
4237 dealoc ( doc ) ;
4338 } ) ) ;
4439} ) ;
0 commit comments