aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng/snifferSpec.js
diff options
context:
space:
mode:
authorMatias Niemelä2013-11-02 13:25:38 -0400
committerMatias Niemelä2013-11-05 21:43:31 -0500
commit974b6d4a5b402c9911aef8adf2f3d30aae1ba8ed (patch)
tree753d88070ab33c9f0a603ad1fc76bba50ed9f5ad /test/ng/snifferSpec.js
parent952fea69fbfbd7a72e335de9bc2cb96699055476 (diff)
downloadangular.js-974b6d4a5b402c9911aef8adf2f3d30aae1ba8ed.tar.bz2
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.
Diffstat (limited to 'test/ng/snifferSpec.js')
-rw-r--r--test/ng/snifferSpec.js4
1 files changed, 4 insertions, 0 deletions
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');
+ }));
});