| <!DOCTYPE html> |
| <title>Test disabling a track.</title> |
| <video> |
| <track kind="subtitles" src="captions-webvtt/captions.vtt"/> |
| </video> |
| <script src="../media-file.js"></script> |
| <script src="../../resources/testharness.js"></script> |
| <script src="../../resources/testharnessreport.js"></script> |
| <script> |
| async_test(function(t) { |
| var video = document.querySelector("video"); |
| video.textTracks[0].mode = "disabled"; |
| |
| // Waiting for the duration of the first cue to elapse. |
| video.ontimeupdate = t.step_func(function (e) { |
| if (e.target.currentTime < 1) |
| return; |
| |
| // End test after the duration of the first cue to make sure |
| // the test doesn't crash during the period this cue would |
| // have been rendered if the track was not disabled. |
| // The duration of the first cue has elapsed. |
| t.done(); |
| }); |
| |
| video.src = findMediaFile("video", "../content/test"); |
| video.play(); |
| }); |
| </script> |