mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
chore($sniffer): make android variable public
This commit is contained in:
parent
73c66715c9
commit
57d50582aa
2 changed files with 16 additions and 0 deletions
|
|
@ -85,6 +85,7 @@ function $SnifferProvider() {
|
|||
vendorPrefix: vendorPrefix,
|
||||
transitions : transitions,
|
||||
animations : animations,
|
||||
android: android,
|
||||
msie : msie,
|
||||
msieDocumentMode: documentMode
|
||||
};
|
||||
|
|
|
|||
|
|
@ -334,6 +334,21 @@ describe('$sniffer', function() {
|
|||
});
|
||||
});
|
||||
|
||||
it('should provide the android version', function() {
|
||||
module(function($provide) {
|
||||
var win = {
|
||||
navigator: {
|
||||
userAgent: 'android 2'
|
||||
}
|
||||
};
|
||||
$provide.value('$document', jqLite({}));
|
||||
$provide.value('$window', win);
|
||||
});
|
||||
inject(function($sniffer) {
|
||||
expect($sniffer.android).toBe(2);
|
||||
});
|
||||
});
|
||||
|
||||
it('should return the internal msie flag', inject(function($sniffer) {
|
||||
expect(isNaN($sniffer.msie)).toBe(isNaN(msie));
|
||||
if (msie) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue