This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree 3 files changed +9
-9
lines changed
3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -596,8 +596,8 @@ describe('$compile', function() {
596
596
expect ( element ) . toHaveClass ( 'class_2' ) ;
597
597
} ) ) ;
598
598
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) .
601
601
it ( 'should handle interpolated css style from replacing directive' , inject (
602
602
function ( $compile , $rootScope ) {
603
603
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() {
334
334
} ) ;
335
335
} ) ;
336
336
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
+ }
339
342
} ) ) ;
340
343
341
344
it ( 'should return document.documentMode as msieDocumentMode' , function ( ) {
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- var msie = + ( ( / m s i e ( \d + ) / . exec ( navigator . userAgent . toLowerCase ( ) ) || [ ] ) [ 1 ] ) ;
4
-
5
3
describe ( 'ngMock' , function ( ) {
6
4
var noop = angular . noop ;
7
5
8
-
9
6
describe ( 'TzDate' , function ( ) {
10
7
11
8
function minutes ( min ) {
@@ -686,10 +683,10 @@ describe('ngMock', function() {
686
683
expect ( d ( $rootScope ) ) . toMatch ( / { " a b c " : " 1 2 3 " } / ) ;
687
684
} ) ) ;
688
685
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 ) {
690
687
// MS IE8 just doesn't work for this kind of thing, since "for ... in" doesn't return
691
688
// things like hasOwnProperty even if it is explicitly defined on the actual object!
692
- if ( msie <= 8 ) return ;
689
+ if ( $sniffer . msie <= 8 ) return ;
693
690
$rootScope . hasOwnProperty = 'X' ;
694
691
expect ( d ( $rootScope ) ) . toMatch ( / S c o p e \( .* \) : \{ / ) ;
695
692
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