OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <title>VTTCue.line</title> | 2 <title>VTTCue.line</title> |
| 3 <link rel="help" href="https://w3c.github.io/webvtt/#dom-vttcue-line"> |
3 <script src=/resources/testharness.js></script> | 4 <script src=/resources/testharness.js></script> |
4 <script src=/resources/testharnessreport.js></script> | 5 <script src=/resources/testharnessreport.js></script> |
5 <div id=log></div> | 6 <div id=log></div> |
6 <script> | 7 <script> |
7 test(function(){ | 8 test(function(){ |
8 var video = document.createElement('video'); | 9 var video = document.createElement('video'); |
9 document.body.appendChild(video); | 10 document.body.appendChild(video); |
10 var c1 = new VTTCue(0, 1, 'text1'); | 11 var c1 = new VTTCue(0, 1, 'text1'); |
11 assert_equals(c1.line, "auto"); | 12 assert_equals(c1.line, "auto"); |
12 var track = document.createElement('track'); | 13 var track = document.createElement('track'); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 t.onerror = this.step_func(function() { | 54 t.onerror = this.step_func(function() { |
54 assert_unreached('got error event'); | 55 assert_unreached('got error event'); |
55 }); | 56 }); |
56 t.src = 'data:text/vtt,'+encodeURIComponent('WEBVTT\n\n00:00:00.000 --> 00:0
0:00.001\ntest\n\n'+ | 57 t.src = 'data:text/vtt,'+encodeURIComponent('WEBVTT\n\n00:00:00.000 --> 00:0
0:00.001\ntest\n\n'+ |
57 '00:00:00.000 --> 00:00:00.001 l
ine:0\ntest\n\n'+ | 58 '00:00:00.000 --> 00:00:00.001 l
ine:0\ntest\n\n'+ |
58 '00:00:00.000 --> 00:00:00.001 l
ine:0%\ntest'); | 59 '00:00:00.000 --> 00:00:00.001 l
ine:0%\ntest'); |
59 t.track.mode = 'showing'; | 60 t.track.mode = 'showing'; |
60 video.appendChild(t); | 61 video.appendChild(t); |
61 }); | 62 }); |
62 </script> | 63 </script> |
OLD | NEW |