blob: 7f67d3846f63522705502394a89b7b1583faf8d1 [file] [log] [blame]
<!DOCTYPE html>
<title>Test that calling load() with no "src" should not fire "error" event and network state should be NETWORK_EMPTY.</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<video></video>
<script>
async_test(function(t) {
var video = document.querySelector("video");
video.onerror = t.unreached_func();
// Network state should remain in NETWORK_EMPTY with missing "src" attribute.
verifyVideoState();
video.load();
setTimeout(t.step_func_done(function() {
verifyVideoState();
}), 100);
function verifyVideoState() {
assert_equals(video.error, null);
assert_equals(video.networkState, HTMLMediaElement.NETWORK_EMPTY);
assert_equals(video.src, "");
}
});
</script>