File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ function $SnifferProvider() {
85
85
vendorPrefix : vendorPrefix ,
86
86
transitions : transitions ,
87
87
animations : animations ,
88
+ android : android ,
88
89
msie : msie ,
89
90
msieDocumentMode : documentMode
90
91
} ;
Original file line number Diff line number Diff line change @@ -334,6 +334,21 @@ describe('$sniffer', function() {
334
334
} ) ;
335
335
} ) ;
336
336
337
+ it ( 'should provide the android version' , function ( ) {
338
+ module ( function ( $provide ) {
339
+ var win = {
340
+ navigator : {
341
+ userAgent : 'android 2'
342
+ }
343
+ } ;
344
+ $provide . value ( '$document' , jqLite ( { } ) ) ;
345
+ $provide . value ( '$window' , win ) ;
346
+ } ) ;
347
+ inject ( function ( $sniffer ) {
348
+ expect ( $sniffer . android ) . toBe ( 2 ) ;
349
+ } ) ;
350
+ } ) ;
351
+
337
352
it ( 'should return the internal msie flag' , inject ( function ( $sniffer ) {
338
353
expect ( isNaN ( $sniffer . msie ) ) . toBe ( isNaN ( msie ) ) ;
339
354
if ( msie ) {
You can’t perform that action at this time.
0 commit comments