@@ -11,10 +11,6 @@ describe('scriptDirective', function() {
11
11
12
12
it ( 'should populate $templateCache with contents of a ng-template script element' , inject (
13
13
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.
18
14
$compile ( '<div>foo' +
19
15
'<script id="/ignore">ignore me</script>' +
20
16
'<script type="text/ng-template" id="/myTemplate.html"><x>{{y}}</x></script>' +
@@ -26,19 +22,18 @@ describe('scriptDirective', function() {
26
22
27
23
28
24
it ( 'should not compile scripts' , inject ( function ( $compile , $templateCache , $rootScope ) {
29
- if ( msie <= 8 ) return ; // see above
30
-
31
25
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>' ;
35
30
36
31
$compile ( doc ) ( $rootScope ) ;
37
32
$rootScope . $digest ( ) ;
38
33
39
34
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}}' ) ;
42
37
dealoc ( doc ) ;
43
38
} ) ) ;
44
39
} ) ;
0 commit comments