aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng
diff options
context:
space:
mode:
Diffstat (limited to 'test/ng')
-rw-r--r--test/ng/snifferSpec.js49
1 files changed, 49 insertions, 0 deletions
diff --git a/test/ng/snifferSpec.js b/test/ng/snifferSpec.js
index d791c17b..3a450e24 100644
--- a/test/ng/snifferSpec.js
+++ b/test/ng/snifferSpec.js
@@ -132,5 +132,54 @@ describe('$sniffer', function() {
});
});
+ it('should be false when there is no transition style', function() {
+ module(function($provide) {
+ var doc = {
+ body : {
+ style : {}
+ }
+ };
+ $provide.value('$document', jqLite(doc));
+ });
+ inject(function($sniffer) {
+ expect($sniffer.supportsTransitions).toBe(false);
+ });
+ });
+
+ it('should be true with vendor-specific transitions', function() {
+ module(function($provide) {
+ var transitionStyle = '1s linear all';
+ var doc = {
+ body : {
+ style : {
+ WebkitTransition : transitionStyle,
+ MozTransition : transitionStyle,
+ OTransition : transitionStyle
+ }
+ }
+ };
+ $provide.value('$document', jqLite(doc));
+ });
+ inject(function($sniffer) {
+ expect($sniffer.supportsTransitions).toBe(true);
+ });
+ });
+
+ it('should be true with w3c-style transitions', function() {
+ module(function($provide) {
+ var doc = {
+ body : {
+ style : {
+ transition : '1s linear all'
+ }
+ }
+ };
+ $provide.value('$document', jqLite(doc));
+ });
+ inject(function($sniffer) {
+ expect($sniffer.supportsTransitions).toBe(true);
+ });
+ });
+
});
});