| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 5 | 5 |
| 6 <style> | 6 <style> |
| 7 -webkit-media-text-track-display { display: block; } | 7 -webkit-media-text-track-display { display: block; } |
| 8 </style> | 8 </style> |
| 9 | 9 |
| 10 <script src=../media-file.js></script> | 10 <script src=../media-file.js></script> |
| 11 <script src=../video-test.js></script> | 11 <script src=../video-test.js></script> |
| 12 <script> | 12 <script> |
| 13 function startTest() | 13 function startTest() |
| 14 { | 14 { |
| 15 findMediaElement(); | 15 findMediaElement(); |
| 16 video.src = findMediaFile('video', '../content/test'); | 16 video.src = findMediaFile('video', '../content/test'); |
| 17 | 17 |
| 18 consoleWrite("** Add a text track to the video element **"); | 18 consoleWrite("** Add a text track to the video element **"); |
| 19 video.addTextTrack("captions", "regular captions track", "en"); | 19 video.addTextTrack("captions", "regular captions track", "en"); |
| 20 | 20 |
| 21 consoleWrite("** Add an empty cue to the track **"); | 21 consoleWrite("** Add an empty cue to the track **"); |
| 22 video.textTracks[0].addCue(new TextTrackCue(0.00, 4.00, "")); | 22 video.textTracks[0].addCue(new VTTCue(0.00, 4.00, "")); |
| 23 | 23 |
| 24 consoleWrite("** Play the video and render the cue **"); | 24 consoleWrite("** Play the video and render the cue **"); |
| 25 video.play(); | 25 video.play(); |
| 26 | 26 |
| 27 consoleWrite(""); | 27 consoleWrite(""); |
| 28 consoleWrite("No crash. PASS."); | 28 consoleWrite("No crash. PASS."); |
| 29 consoleWrite(""); | 29 consoleWrite(""); |
| 30 | 30 |
| 31 endTest(); | 31 endTest(); |
| 32 } | 32 } |
| 33 </script> | 33 </script> |
| 34 </head> | 34 </head> |
| 35 | 35 |
| 36 <body onload="startTest()"> | 36 <body onload="startTest()"> |
| 37 <p>Tests that setting display to block does not crash the browser.</p> | 37 <p>Tests that setting display to block does not crash the browser.</p> |
| 38 <video controls /> | 38 <video controls /> |
| 39 </body> | 39 </body> |
| 40 </html> | 40 </html> |
| OLD | NEW |