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

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

Issue 854863002: VTTCue: Add TypeChecking=Unrestricted (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Drop unnecessary test. Created 5 years, 11 months 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 9
10 var cues; 10 var cues;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 testExpected("newCue.startTime", 0.0); 57 testExpected("newCue.startTime", 0.0);
58 testExpected("newCue.endTime", 1.0); 58 testExpected("newCue.endTime", 1.0);
59 testExpected("newCue.pauseOnExit", false); 59 testExpected("newCue.pauseOnExit", false);
60 testExpected("newCue.vertical", ""); 60 testExpected("newCue.vertical", "");
61 testExpected("newCue.snapToLines", true); 61 testExpected("newCue.snapToLines", true);
62 testExpected("newCue.line", -1); 62 testExpected("newCue.line", -1);
63 testExpected("newCue.position", 50); 63 testExpected("newCue.position", 50);
64 testExpected("newCue.size", 100); 64 testExpected("newCue.size", 100);
65 testExpected("newCue.align", "middle"); 65 testExpected("newCue.align", "middle");
66 66
67 consoleWrite("<br>*** Create an old-style cue with an id.");
68 run("oldStyleCue = new VTTCue('sausage-cue', 33, 3.4, 'Sausage?' )");
69 testExpected("oldStyleCue.id", "");
70 testExpected("oldStyleCue.startTime.toString()", "NaN");
71 testExpected("oldStyleCue.endTime", 33);
72 consoleWrite("*** Make sure the old-style cue is not inserted be cause its start time is not a number.");
73 testExpected("testTrack.track.cues.length", 5);
74 run("testTrack.track.addCue(oldStyleCue)");
75 testExpected("testTrack.track.cues.length", 5);
76
77 consoleWrite("<br>*** Remove a cue created with addCue()."); 67 consoleWrite("<br>*** Remove a cue created with addCue().");
78 run("testTrack.track.removeCue(textCue)"); 68 run("testTrack.track.removeCue(textCue)");
79 testExpected("textCue.track", null); 69 testExpected("textCue.track", null);
80 testExpected("cues[1].startTime", 31); 70 testExpected("cues[1].startTime", 31);
81 testExpected("cues[2].startTime", 61); 71 testExpected("cues[2].startTime", 61);
82 72
83 consoleWrite("<br>*** Remove a cue added from the WebVTT file.") ; 73 consoleWrite("<br>*** Remove a cue added from the WebVTT file.") ;
84 run("textCue = cues[2]"); 74 run("textCue = cues[2]");
85 run("testTrack.track.removeCue(textCue)"); 75 run("testTrack.track.removeCue(textCue)");
86 testExpected("textCue.track", null); 76 testExpected("textCue.track", null);
(...skipping 15 matching lines...) Expand all
102 92
103 </script> 93 </script>
104 </head> 94 </head>
105 <body> 95 <body>
106 <p>Tests TextTrack's addCue and removeCue</p> 96 <p>Tests TextTrack's addCue and removeCue</p>
107 <video> 97 <video>
108 <track id="testTrack" src="captions-webvtt/tc013-settings.vtt" kind= "captions" onload="trackLoaded()" default> 98 <track id="testTrack" src="captions-webvtt/tc013-settings.vtt" kind= "captions" onload="trackLoaded()" default>
109 </video> 99 </video>
110 </body> 100 </body>
111 </html> 101 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698