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

Side by Side Diff: LayoutTests/media/track/opera/interfaces/TextTrackCue/pauseOnExit.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.pauseOnExit</title> 2 <title>TextTrackCue.pauseOnExit</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_equals(c1.pauseOnExit, false); 14 assert_equals(c1.pauseOnExit, false);
15 c1.pauseOnExit = null; 15 c1.pauseOnExit = null;
16 assert_equals(c1.pauseOnExit, false); 16 assert_equals(c1.pauseOnExit, false);
17 c1.pauseOnExit = 'foo'; 17 c1.pauseOnExit = 'foo';
18 assert_equals(c1.pauseOnExit, true); 18 assert_equals(c1.pauseOnExit, true);
19 }, document.title+', script-created cue'); 19 }, document.title+', script-created cue');
20 20
21 var t_parsed = async_test(document.title+', parsed cue'); 21 var t_parsed = async_test(document.title+', parsed cue');
22 t_parsed.step(function(){ 22 t_parsed.step(function(){
23 var t = document.createElement('track'); 23 var t = document.createElement('track');
24 t.onload = this.step_func(function(){ 24 t.onload = this.step_func(function(){
25 var c1 = t.track.cues[0]; 25 var c1 = t.track.cues[0];
26 assert_equals(c1.pauseOnExit, false); 26 assert_equals(c1.pauseOnExit, false);
27 c1.pauseOnExit = null; 27 c1.pauseOnExit = null;
28 assert_equals(c1.pauseOnExit, false); 28 assert_equals(c1.pauseOnExit, false);
29 c1.pauseOnExit = 'foo'; 29 c1.pauseOnExit = 'foo';
30 assert_equals(c1.pauseOnExit, true); 30 assert_equals(c1.pauseOnExit, true);
31 this.done(); 31 this.done();
32 }); 32 });
33 t.src = 'data:text/vtt,'+encodeURIComponent('WEBVTT\n\n00:00:00.000 --> 00:0 0:00.001\ntest'); 33 t.src = 'data:text/vtt,'+encodeURIComponent('WEBVTT\n\n00:00:00.000 --> 00:0 0:00.001\ntest');
34 t.track.mode = 'showing'; 34 t.track.mode = 'showing';
35 video.appendChild(t); 35 video.appendChild(t);
36 }); 36 });
37 </script> 37 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698