blob: 0e6f993e1c67468519446846c54b0955ddaaf153 [file] [log] [blame]
<!DOCTYPE html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<body>
<div id='e'></div>
</body>
<script>
var element = document.getElementById('e');
var style = getComputedStyle(element);
var duration = 1;
var animation = new Animation(element,
[{opacity: '1', offset: 0},
{opacity: '0', offset: 1}],
duration);
test(function() {
var player = document.timeline.play(animation);
player.pause();
player.currentTime = duration / 2;
assert_equals(style.opacity, '0.5');
}, 'Calling document.timeline.play() should start an animation.');
</script>