Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / web-animations-api / timeline-updates-players.html
blob13f50d82eed34cd5d99c4de89fb262aac16c72c6
1 <!DOCTYPE html>
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>
9 <script>
10 var element = document.getElementById('element');
11 var keyframeEffect = new KeyframeEffect(element, [{left: '0px'}, {left: '100px'}], 10);
12 test(function() {
13 var player = document.timeline.play(keyframeEffect);
14 player.finish();
15 assert_equals(getComputedStyle(element).left, 'auto');
17 player.play();
18 assert_equals(getComputedStyle(element).left, '0px');
20 player.finish();
21 }, 'Player updated after finish and play');
23 test(function() {
24 var player = document.timeline.play(keyframeEffect);
25 assert_equals(getComputedStyle(element).left, '0px');
26 var effect = player.effect
27 player.effect = null;
28 assert_equals(getComputedStyle(element).left, 'auto');
30 player.effect = effect;
31 assert_equals(getComputedStyle(element).left, '0px');
33 player.finish();
34 }, 'Player updated after clear and set effect');
35 </script>