@@ -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 ( 'display and animation* properties are not animated' , function ( ) {
359
+ var target = document . createElement ( 'div' ) ;
360
+ target . style . position = 'absolute' ;
361
+ target . style . display = 'block' ;
362
+ target . style [ 'animation-timing-function' ] = 'ease-in' ;
363
+ document . body . appendChild ( target ) ;
364
+
365
+ var keyframeEffect = new KeyframeEffect ( target , [
366
+ { opacity : '0.75' , display : 'none' , animationTimingFunction : 'linear' } ,
367
+ { opacity : '0.25' , display : 'none' , animationTimingFunction : 'linear' }
368
+ ] , 2000 ) ;
369
+
370
+ var animation = document . timeline . play ( keyframeEffect ) ;
371
+
372
+ tick ( 0 ) ;
373
+ assert . equal ( getComputedStyle ( target ) . opacity , 0.75 ) ;
374
+ assert . equal ( getComputedStyle ( target ) . display , 'block' ) ;
375
+ assert . equal ( getComputedStyle ( target ) . animationTimingFunction , 'ease-in' ) ;
376
+
377
+ tick ( 1000 ) ;
378
+ assert . equal ( getComputedStyle ( target ) . opacity , 0.5 ) ;
379
+ assert . equal ( getComputedStyle ( target ) . display , 'block' ) ;
380
+ assert . equal ( getComputedStyle ( target ) . animationTimingFunction , 'ease-in' ) ;
381
+ } ) ;
357
382
} ) ;
0 commit comments