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