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

Side by Side Diff: LayoutTests/media/track/regions-webvtt/text-track-cue-region-attribute.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 var cue; 9 var cue;
10 10
11 function startTest() 11 function startTest()
12 { 12 {
13 if (!window.VTTRegion) { 13 if (!window.VTTRegion) {
14 failTest(); 14 failTest();
15 return; 15 return;
16 } 16 }
17 17
18 consoleWrite("<br>** Test the setter and getter through the JS A PI **"); 18 consoleWrite("<br>** Test the setter and getter through the JS A PI **");
19 cue = new TextTrackCue(0.0, 1.0, "sample"); 19 cue = new VTTCue(0.0, 1.0, "sample");
20 20
21 testExpected("cue.regionId", ""); 21 testExpected("cue.regionId", "");
22 cue.regionId = "someId"; 22 cue.regionId = "someId";
23 testExpected("cue.regionId", "someId"); 23 testExpected("cue.regionId", "someId");
24 24
25 consoleWrite("<br>** Test parsing a region attribute of a cue ** "); 25 consoleWrite("<br>** Test parsing a region attribute of a cue ** ");
26 findMediaElement(); 26 findMediaElement();
27 27
28 cue = video.textTracks[0].cues[0]; 28 cue = video.textTracks[0].cues[0];
29 testExpected("cue.regionId", "someregionattributeid"); 29 testExpected("cue.regionId", "someregionattributeid");
30 30
31 consoleWrite("<br>** Test that region attribute is ignored if ei ther line position or cue size are specified or writing direction is not horizon tal **"); 31 consoleWrite("<br>** Test that region attribute is ignored if ei ther line position or cue size are specified or writing direction is not horizon tal **");
32 for (i = 1; i < 4; ++i) { 32 for (i = 1; i < 4; ++i) {
33 cue = video.textTracks[0].cues[i]; 33 cue = video.textTracks[0].cues[i];
34 testExpected("cue.regionId", ""); 34 testExpected("cue.regionId", "");
35 } 35 }
36 36
37 consoleWrite(""); 37 consoleWrite("");
38 endTest(); 38 endTest();
39 } 39 }
40 </script> 40 </script>
41 </head> 41 </head>
42 <body> 42 <body>
43 <p>Tests the regionId attribute of a cue.</p> 43 <p>Tests the regionId attribute of a cue.</p>
44 <video controls> 44 <video controls>
45 <track src="../captions-webvtt/header-regions.vtt" kind="captions" d efault onload="startTest()"> 45 <track src="../captions-webvtt/header-regions.vtt" kind="captions" d efault onload="startTest()">
46 </video> 46 </video>
47 </body> 47 </body>
48 </html> 48 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698