Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 57d5058

Browse files
clkaotbosch
authored andcommitted
chore($sniffer): make android variable public
1 parent 73c6671 commit 57d5058

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/ng/sniffer.js

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ function $SnifferProvider() {
8585
vendorPrefix: vendorPrefix,
8686
transitions : transitions,
8787
animations : animations,
88+
android: android,
8889
msie : msie,
8990
msieDocumentMode: documentMode
9091
};

test/ng/snifferSpec.js

+15
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,21 @@ describe('$sniffer', function() {
334334
});
335335
});
336336

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+
337352
it('should return the internal msie flag', inject(function($sniffer) {
338353
expect(isNaN($sniffer.msie)).toBe(isNaN(msie));
339354
if (msie) {

0 commit comments

Comments
 (0)