2 <script src=
"../resources/testharness.js"></script>
3 <script src=
"../resources/testharnessreport.js"></script>
5 <!-- This tests that players get updated even if they have previously had their effect removed or go out of effect. -->
7 <div id='element'
></div>
10 var element
= document
.getElementById('element');
11 var keyframeEffect
= new KeyframeEffect(element
, [{left
: '0px'}, {left
: '100px'}], 10);
13 var player
= document
.timeline
.play(keyframeEffect
);
15 assert_equals(getComputedStyle(element
).left
, 'auto');
18 assert_equals(getComputedStyle(element
).left
, '0px');
21 }, 'Player updated after finish and play');
24 var player
= document
.timeline
.play(keyframeEffect
);
25 assert_equals(getComputedStyle(element
).left
, '0px');
26 var effect
= player
.effect
28 assert_equals(getComputedStyle(element
).left
, 'auto');
30 player
.effect
= effect
;
31 assert_equals(getComputedStyle(element
).left
, '0px');
34 }, 'Player updated after clear and set effect');