Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Side by Side Diff: LayoutTests/media/track/track-remove-active-cue-crash.html

Issue 72543003: Update TextTrackCue tests to use VTTCue where appropriate (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 <script src=../media-file.js></script> 6 <script src=../media-file.js></script>
7 <script src=../video-test.js></script> 7 <script src=../video-test.js></script>
8 <script> 8 <script>
9 function removeActiveCue() 9 function removeActiveCue()
10 { 10 {
(...skipping 12 matching lines...) Expand all
23 23
24 function startTest() 24 function startTest()
25 { 25 {
26 findMediaElement(); 26 findMediaElement();
27 video.src = findMediaFile('video', '../content/test'); 27 video.src = findMediaFile('video', '../content/test');
28 28
29 consoleWrite("** Add a text track to the video element **"); 29 consoleWrite("** Add a text track to the video element **");
30 video.addTextTrack("captions", "regular captions track", "en"); 30 video.addTextTrack("captions", "regular captions track", "en");
31 31
32 consoleWrite("** Add a cue to the track with enter event listener. * *"); 32 consoleWrite("** Add a cue to the track with enter event listener. * *");
33 var cue = new TextTrackCue(0.00, 4.00, "Random"); 33 var cue = new VTTCue(0.00, 4.00, "Random");
34 cue.addEventListener("enter", removeActiveCue); 34 cue.addEventListener("enter", removeActiveCue);
35 video.textTracks[0].addCue(cue); 35 video.textTracks[0].addCue(cue);
36 36
37 consoleWrite(""); 37 consoleWrite("");
38 consoleWrite("** Play the video and remove cue when it becomes activ e. **"); 38 consoleWrite("** Play the video and remove cue when it becomes activ e. **");
39 run("video.play()"); 39 run("video.play()");
40 40
41 video.textTracks[0].mode = "showing"; 41 video.textTracks[0].mode = "showing";
42 } 42 }
43 </script> 43 </script>
44 </head> 44 </head>
45 45
46 <body onload="startTest()"> 46 <body onload="startTest()">
47 <p>Tests that removing an active cue does not crash the browser.</p> 47 <p>Tests that removing an active cue does not crash the browser.</p>
48 <video controls /> 48 <video controls />
49 </body> 49 </body>
50 </html> 50 </html>
OLDNEW
« no previous file with comments | « LayoutTests/media/track/track-disabled-addcue.html ('k') | LayoutTests/media/video-controls-captions.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698