track-remove-by-setting-innerHTML.html (1008B)
1 <!DOCTYPE html> 2 <title>Removing a track by setting video.innerHTML doesn't crash</title> 3 <script src="/common/media.js"></script> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <video> 7 <track default src="resources/captions-gaps.vtt"> 8 <script> 9 // https://bugs.webkit.org/show_bug.cgi?id=100981 10 async_test(function(t) { 11 var firstSeek = true; 12 var video = document.querySelector('video'); 13 video.onseeked = t.step_func(function() { 14 if (!firstSeek) { 15 t.done(); 16 return; 17 } 18 19 // Remove the text track 20 video.innerHTML = ''; 21 22 // Seek again to force a repaint. 23 video.currentTime = 7.9; 24 firstSeek = false; 25 }); 26 27 video.currentTime = 0.5; 28 video.src = getVideoURI('/media/counting'); 29 }); 30 </script> 31 </video>