blob: 9c8af31bbabe368431487b600b5f3888f6d98420 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src=../media-file.js></script>
<script src=../video-test.js></script>
</head>
<body>
<p>Tests the load event on HTMLTrackElement and LOADED readyState on TextTrack when src is set from JavaScript.</p>
<video>
<track id="testTrackEmpty">
</video>
<script>
function trackLoaded()
{
consoleWrite("EVENT(load)");
testExpected("track.track.readyState", TextTrack.LOADED);
endTest();
}
track = document.getElementById('testTrackEmpty');
testExpected("track.track.readyState", TextTrack.NONE);
track.addEventListener("load", function () { trackLoaded(); }, true);
track.src = "captions-webvtt/tc004-webvtt-file.vtt";
</script>
</body>
</html>