Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<title>Setting HTMLTrackElement.src to the empty string fires 'error' and sets readyState to ERROR</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<video></video>
<script>
async_test(t => {
let track = document.createElement("track");
track.src = '';
track.default = true;
track.onerror = t.step_func_done(() => {
assert_equals(track.readyState, HTMLTrackElement.ERROR);
});
track.onload = t.unreached_func('fired load');
assert_equals(track.readyState, HTMLTrackElement.NONE);
document.querySelector('video').appendChild(track);
});
</script>