File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -596,8 +596,8 @@ describe('$compile', function() {
596596 expect ( element ) . toHaveClass ( 'class_2' ) ;
597597 } ) ) ;
598598
599- if ( ! msie || msie > 10 ) {
600- // style interpolation not working on IE<11 .
599+ if ( ! msie || msie > 11 ) {
600+ // style interpolation not working on IE (including IE11) .
601601 it ( 'should handle interpolated css style from replacing directive' , inject (
602602 function ( $compile , $rootScope ) {
603603 element = $compile ( '<div replace-with-interpolated-style></div>' ) ( $rootScope ) ;
Original file line number Diff line number Diff line change @@ -334,8 +334,11 @@ describe('$sniffer', function() {
334334 } ) ;
335335 } ) ;
336336
337- it ( 'should return true for msie when internet explorer is being used' , inject ( function ( $sniffer ) {
338- expect ( $sniffer . msie > 0 ) . toBe ( window . navigator . appName == 'Microsoft Internet Explorer' ) ;
337+ it ( 'should return the internal msie flag' , inject ( function ( $sniffer ) {
338+ expect ( isNaN ( $sniffer . msie ) ) . toBe ( isNaN ( msie ) ) ;
339+ if ( msie ) {
340+ expect ( $sniffer . msie ) . toBe ( msie ) ;
341+ }
339342 } ) ) ;
340343
341344 it ( 'should return document.documentMode as msieDocumentMode' , function ( ) {
Original file line number Diff line number Diff line change 11'use strict' ;
22
3- var msie = + ( ( / m s i e ( \d + ) / . exec ( navigator . userAgent . toLowerCase ( ) ) || [ ] ) [ 1 ] ) ;
4-
53describe ( 'ngMock' , function ( ) {
64 var noop = angular . noop ;
75
8-
96 describe ( 'TzDate' , function ( ) {
107
118 function minutes ( min ) {
@@ -686,10 +683,10 @@ describe('ngMock', function() {
686683 expect ( d ( $rootScope ) ) . toMatch ( / { " a b c " : " 1 2 3 " } / ) ;
687684 } ) ) ;
688685
689- it ( 'should serialize scope that has overridden "hasOwnProperty"' , inject ( function ( $rootScope ) {
686+ it ( 'should serialize scope that has overridden "hasOwnProperty"' , inject ( function ( $rootScope , $sniffer ) {
690687 // MS IE8 just doesn't work for this kind of thing, since "for ... in" doesn't return
691688 // things like hasOwnProperty even if it is explicitly defined on the actual object!
692- if ( msie <= 8 ) return ;
689+ if ( $sniffer . msie <= 8 ) return ;
693690 $rootScope . hasOwnProperty = 'X' ;
694691 expect ( d ( $rootScope ) ) . toMatch ( / S c o p e \( .* \) : \{ / ) ;
695692 expect ( d ( $rootScope ) ) . toMatch ( / h a s O w n P r o p e r t y : " X " / ) ;
You can’t perform that action at this time.
0 commit comments