From 974b6d4a5b402c9911aef8adf2f3d30aae1ba8ed Mon Sep 17 00:00:00 2001 From: Matias Niemelä Date: Sat, 2 Nov 2013 13:25:38 -0400 Subject: chore($sniffer): make msie variable public The msie variable is a global variable used within the ng core which contains the version number for the current Internet Explorer browser that is rendering the application. Other modules outside of the ng core could make use of this variable instead of having to rollout duplicate detection code. This code makes it easy to reuse this simple property within the $sniffer service. --- test/ng/snifferSpec.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/ng') diff --git a/test/ng/snifferSpec.js b/test/ng/snifferSpec.js index 6e9dc830..9ab317d2 100644 --- a/test/ng/snifferSpec.js +++ b/test/ng/snifferSpec.js @@ -333,4 +333,8 @@ describe('$sniffer', function() { }); }); }); + + it('should return true for msie when internet explorer is being used', inject(function($sniffer) { + expect($sniffer.msie > 0).toBe(window.navigator.appName == 'Microsoft Internet Explorer'); + })); }); -- cgit v1.2.3