<!DOCTYPE html>
<title>Test that Audio() object loads the resource after src attribute is set and load() is called.</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script>
async_test(function(t) {
var audio = new Audio();
var audioFile = "content/test.oga";
audio.src = audioFile;
audio.onloadstart = t.step_func(function () {
var url = audio.currentSrc;
assert_equals(url.substr(url.lastIndexOf("/media/")+7), audioFile);
});
audio.oncanplaythrough = t.step_func_done();
audio.load();
});
</script>