<!doctype html>
<title>autoplay clears the autoplaying flag</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script>
async_test(function(t)
{
var audio = document.createElement('audio');
audio.src = 'data:audio/wav;base64,UklGRjQAAABXQVZFZm10IBAAAAABAAEAQB8AAIA+AAACABAAZGF0YRAAAAAAAAAA//8CAP3/BAD7/wQA';
audio.autoplay = true;
audio.addEventListener('ended', function()
{
audio.currentTime = 0;
});
audio.addEventListener('seeked', t.step_func_done(function()
{
assert_true(audio.paused);
assert_true(audio.readyState == audio.HAVE_ENOUGH_DATA);
}));
});
</script>