blob: 982c38bc46e86c7f7be0a883cd28412d80a4f713 [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>
<script>
var testTrack;
function seeked()
{
consoleWrite("** Set the mode of the text track to hidden, then showing again. **");
testTrack.track.mode = "hidden";
testTrack.track.mode = "showing";
consoleWrite("** Set the mode of the text track to disabled. **");
testTrack.track.mode = "disabled";
consoleWrite("");
consoleWrite("No crash. PASS.");
consoleWrite("");
endTest();
}
function startTest()
{
consoleWrite("** Set the mode of the text track to showing. **");
testTrack.track.mode = "showing";
consoleWrite("** Seek to a time with a caption. **");
video.currentTime = 1.5;
}
function loaded()
{
findMediaElement();
testTrack = document.querySelector('track');
video.src = findMediaFile('video', '../content/counting');
waitForEvent('seeked', seeked);
waitForEvent('canplaythrough', startTest);
}
setCaptionDisplayMode('Automatic');
</script>
</head>
<body onload="loaded()">
<video controls >
<track src="captions-webvtt/captions-gaps.vtt" kind="captions" default >
</video>
<p>Tests that cues are properly removed from the active cue list when their track changes mode to disabled.</p>
</body>
</html>