<!DOCTYPE html>
<title>Test that Audio() sets "preload" attribute.</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script>
async_test(function(t) {
var audio = new Audio();
// Test initial attribute value.
assert_equals(audio.getAttribute("preload"), "auto");
assert_equals(audio.preload, "auto");
audio.oncanplaythrough = t.step_func_done(function() {
assert_equals(audio.getAttribute("preload"), "auto");
assert_equals(audio.preload, "auto");
});
audio.src = "content/test.oga";
audio.load();
});
</script>