OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <title>TextTrackCue.vertical</title> | 2 <title>TextTrackCue.vertical</title> |
3 <script src=../../../../../resources/testharness.js></script> | 3 <script src=../../../../../resources/testharness.js></script> |
4 <script src=../../../../../resources/testharnessreport.js></script> | 4 <script src=../../../../../resources/testharnessreport.js></script> |
5 <div id=log></div> | 5 <div id=log></div> |
6 <script> | 6 <script> |
7 setup(function(){ | 7 setup(function(){ |
8 window.video = document.createElement('video'); | 8 window.video = document.createElement('video'); |
9 window.t1 = video.addTextTrack('subtitles'); | 9 window.t1 = video.addTextTrack('subtitles'); |
10 document.body.appendChild(video); | 10 document.body.appendChild(video); |
(...skipping 25 matching lines...) Expand all Loading... |
36 var t = document.createElement('track'); | 36 var t = document.createElement('track'); |
37 t.onload = this.step_func(function(){ | 37 t.onload = this.step_func(function(){ |
38 var c1 = t.track.cues[0]; | 38 var c1 = t.track.cues[0]; |
39 var c2 = t.track.cues[1]; | 39 var c2 = t.track.cues[1]; |
40 var c3 = t.track.cues[2]; | 40 var c3 = t.track.cues[2]; |
41 assert_equals(c1.vertical, ''); | 41 assert_equals(c1.vertical, ''); |
42 assert_equals(c2.vertical, 'rl'); | 42 assert_equals(c2.vertical, 'rl'); |
43 assert_equals(c3.vertical, 'lr'); | 43 assert_equals(c3.vertical, 'lr'); |
44 this.done(); | 44 this.done(); |
45 }); | 45 }); |
46 t.src = 'data:text/vtt,'+encodeURIComponent('WEBVTT\n\n00:00:00.000 --> 00:0
0:00.001\ntest'+ | 46 t.src = 'data:text/vtt,'+encodeURIComponent('WEBVTT\n\n00:00:00.000 --> 00:0
0:00.001\ntest\n'+ |
47 '00:00:00.000 --> 00:00:00.001 v
ertical:rl\ntest\n\n'+ | 47 '00:00:00.000 --> 00:00:00.001 v
ertical:rl\ntest\n\n'+ |
48 '00:00:00.000 --> 00:00:00.001 v
ertical:lr\ntest'); | 48 '00:00:00.000 --> 00:00:00.001 v
ertical:lr\ntest'); |
49 t.track.mode = 'showing'; | 49 t.track.mode = 'showing'; |
50 video.appendChild(t); | 50 video.appendChild(t); |
51 }); | 51 }); |
52 </script> | 52 </script> |
OLD | NEW |