| OLD | NEW |
| 1 <!doctype html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <title>This test makes sure that removing a track by setting video.innerHTML doe
sn't crash (https://bugs.webkit.org/show_bug.cgi?id=100981). If this test does n
ot crash, it passes.</title> |
| 3 <head> | 3 <script src="../media-file.js"></script> |
| 4 <script src="../media-file.js"></script> | 4 <script src="../../resources/testharness.js"></script> |
| 5 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 | 5 <script src="../../resources/testharnessreport.js"></script> |
| 6 (Please avoid writing new tests using video-test.js) --> | 6 <video> |
| 7 <script src="../video-test.js"></script> | 7 <track default="" src="captions-webvtt/captions-gaps.vtt"> |
| 8 <script type="text/javascript"> | 8 </video> |
| 9 var firstSeek = true; | 9 </div> |
| 10 <script> |
| 11 async_test(function(t) { |
| 12 var firstSeek = true; |
| 13 var video = document.querySelector('video'); |
| 14 video.onseeked = t.step_func(function() { |
| 15 if (!firstSeek) { |
| 16 t.done(); |
| 17 return; |
| 18 } |
| 10 | 19 |
| 11 function seeked() | 20 // Remove the text track |
| 12 { | 21 video.innerHTML = ''; |
| 13 if (!firstSeek) { | |
| 14 endTest(); | |
| 15 return; | |
| 16 } | |
| 17 | 22 |
| 18 // Remove the text tra | 23 // Seek again to force a repaint. |
| 19 video.innerHTML = "This is a test"; | 24 video.currentTime = 7.9; |
| 20 | 25 firstSeek = false; |
| 21 // Seek again to force a repaint. | 26 }); |
| 22 run("video.currentTime = 7.9"); | 27 |
| 23 firstSeek = false; | 28 video.currentTime = 0.5; |
| 24 } | 29 video.src = findMediaFile('video', '../content/counting'); |
| 25 | 30 }); |
| 26 function loaded() | 31 </script> |
| 27 { | |
| 28 findMediaElement(); | |
| 29 waitForEvent('error'); | |
| 30 waitForEvent('seeked', seeked); | |
| 31 waitForEventOnce('canplaythrough', function() | |
| 32 { | |
| 33 video.currentTime = 0.5; | |
| 34 }); | |
| 35 video.src = findMediaFile('video', '../content/counting'); | |
| 36 } | |
| 37 </script> | |
| 38 </head> | |
| 39 <body onload=loaded()> | |
| 40 <video> | |
| 41 <track default="" src="captions-webvtt/captions-gaps.vtt"> | |
| 42 </video> | |
| 43 <div> | |
| 44 This test makes sure that removing a track by setting video.innerHTML
doesn't crash (https://bugs.webkit.org/show_bug.cgi?id=100981). | |
| 45 <p>If this test does not crash, it passes.</p> | |
| 46 </div> | |
| 47 </body> | |
| 48 </html> | |
| OLD | NEW |