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

Side by Side Diff: LayoutTests/media/track/opera/interfaces/VTTCue/snapToLines.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 <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
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698