<!DOCTYPE html>
<title>Test that an explicit load() to a media element whose preload is set to "none" still loads the video.</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<video preload="none"></video>
<script>
async_test(function(t) {
var video = document.querySelector("video");
assert_equals(video.preload, "none");
assert_equals(video.readyState, HTMLMediaElement.HAVE_NOTHING);
video.onloadedmetadata = t.unreached_func();
// Wait 500ms before load()ing to make sure setting src does not
// kick off the load (i.e. preload=none should still be respected).
setTimeout(function() {
assert_equals(video.readyState, HTMLMediaElement.HAVE_NOTHING);
video.onloadedmetadata = t.step_func_done();
video.load();
}, 300);
video.src = "content/test.ogv";
});
</script>