| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <title>TextTrackCue.snapToLines</title> | 2 <title>VTTCue.snapToLines</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); |
| 11 }); | 11 }); |
| 12 test(function(){ | 12 test(function(){ |
| 13 var c1 = new TextTrackCue(0, 1, 'text1'); | 13 var c1 = new VTTCue(0, 1, 'text1'); |
| 14 assert_true(c1.snapToLines); | 14 assert_true(c1.snapToLines); |
| 15 c1.line = 101; | 15 c1.line = 101; |
| 16 c1.snapToLines = false; | 16 c1.snapToLines = false; |
| 17 assert_false(c1.snapToLines); | 17 assert_false(c1.snapToLines); |
| 18 c1.snapToLines = true; | 18 c1.snapToLines = true; |
| 19 assert_true(c1.snapToLines); | 19 assert_true(c1.snapToLines); |
| 20 c1.line = -1; | 20 c1.line = -1; |
| 21 c1.snapToLines = false; | 21 c1.snapToLines = false; |
| 22 assert_false(c1.snapToLines); | 22 assert_false(c1.snapToLines); |
| 23 c1.snapToLines = true; | 23 c1.snapToLines = true; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 85 |
| 86 this.done(); | 86 this.done(); |
| 87 }); | 87 }); |
| 88 t.src = 'data:text/vtt,'+encodeURIComponent('WEBVTT\n\n00:00:00.000 --> 00:0
0:00.001\ntest\n\n'+ | 88 t.src = 'data:text/vtt,'+encodeURIComponent('WEBVTT\n\n00:00:00.000 --> 00:0
0:00.001\ntest\n\n'+ |
| 89 '00:00:00.000 --> 00:00:00.001 l
ine:0\ntest\n\n'+ | 89 '00:00:00.000 --> 00:00:00.001 l
ine:0\ntest\n\n'+ |
| 90 '00:00:00.000 --> 00:00:00.001 l
ine:0%\ntest'); | 90 '00:00:00.000 --> 00:00:00.001 l
ine:0%\ntest'); |
| 91 t.track.mode = 'showing'; | 91 t.track.mode = 'showing'; |
| 92 video.appendChild(t); | 92 video.appendChild(t); |
| 93 }); | 93 }); |
| 94 </script> | 94 </script> |
| OLD | NEW |