blob: bf8e92da391f5304f013adcf8e770ae9ebb0650a [file] [log] [blame]
<!DOCTYPE html>
<title>Tests that the cue display tree has been removed properly and no crash happens.</title>
<script src="../media-file.js"></script>
<script src="../media-controls.js"></script>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<video>
<track src="captions-webvtt/captions.vtt" kind="captions" default>
</video>
<script>
async_test(function(t) {
var video = document.querySelector("video");
video.src = findMediaFile("video", "../content/test");
video.play();
video.oncanplaythrough = t.step_func_done(function() {
// Empty the contents of the video element when it is ready to play.
video.textContent = "";
// Text track should not be rendered anymore.
try {
textTrackDisplayElement(video);
assert_unreached("textTrackDisplayElement did not throw");
} catch (e) {
}
});
});
</script>