@@ -354,4 +354,29 @@ suite('keyframe-effect-constructor', function() {
354
354
effect . timing . iterations = 2 ;
355
355
assert . closeTo ( Number ( getComputedStyle ( target ) . opacity ) , 0.75 , 0.01 , 't=125 after setting iterations' ) ;
356
356
} ) ;
357
+
358
+ test ( 'Not Animatable properties are not animated' , function ( ) {
359
+ var target = document . createElement ( 'div' ) ;
360
+ target . style . opacity = 0 ;
361
+ target . style . display = 'block' ;
362
+ target . style [ 'animation-timing-function' ] = 'ease-in' ;
363
+ target . style [ 'transition-duration' ] = '2s' ;
364
+ document . body . appendChild ( target ) ;
365
+
366
+ var keyframeEffect = new KeyframeEffect ( target , [
367
+ { opacity : '0.75' , display : 'none' , animationTimingFunction : 'linear' , transitionDuration : '5s' } ,
368
+ { opacity : '0.25' , display : 'none' , animationTimingFunction : 'linear' , transitionDuration : '5s' }
369
+ ] , 2000 ) ;
370
+
371
+ var animation = document . timeline . play ( keyframeEffect ) ;
372
+
373
+ tick ( 0 ) ;
374
+ assert . equal ( getComputedStyle ( target ) . opacity , 0.75 ) ;
375
+
376
+ tick ( 1000 ) ;
377
+ assert . equal ( getComputedStyle ( target ) . opacity , 0.5 ) ;
378
+ assert . equal ( getComputedStyle ( target ) . display , 'block' ) ;
379
+ assert . equal ( getComputedStyle ( target ) . animationTimingFunction , 'ease-in' ) ;
380
+ assert . equal ( getComputedStyle ( target ) . transitionDuration , '2s' ) ;
381
+ } ) ;
357
382
} ) ;
0 commit comments