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