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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-webvtt-tc018-align-text-line-position.html

Issue 2029663002: Convert track-webvtt-tc[019-021] tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 6 months 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Tests cue alignment, line and text position from settings.</title> 2 <title>Tests cue alignment, line and text position from settings.</title>
3 <script src="track-helpers.js"></script> 3 <script src="track-helpers.js"></script>
4 <script src="../../resources/testharness.js"></script> 4 <script src="../../resources/testharness.js"></script>
5 <script src="../../resources/testharnessreport.js"></script> 5 <script src="../../resources/testharnessreport.js"></script>
6 <video> 6 <video>
7 <track src="captions-webvtt/tc018-align-text-line-position.vtt"> 7 <track src="captions-webvtt/tc018-align-text-line-position.vtt">
8 <track src="captions-webvtt/tc018-align-text-line-position-bad.vtt"> 8 <track src="captions-webvtt/tc018-align-text-line-position-bad.vtt">
9 </video> 9 </video>
10 <script> 10 <script>
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 31
32 function testTrack(index) { 32 function testTrack(index) {
33 var expected = [ 33 var expected = [
34 { align : "start", position : 10, line : 0, snapToLines : fals e }, 34 { align : "start", position : 10, line : 0, snapToLines : fals e },
35 { align : "start", position : "auto", line : 0, snapToLines : true }, 35 { align : "start", position : "auto", line : 0, snapToLines : true },
36 { align : "middle", position : 80, line : 80, snapToLines : fals e }, 36 { align : "middle", position : 80, line : 80, snapToLines : fals e },
37 { align : "end", position : 30, line : 5, snapToLines : true }, 37 { align : "end", position : 30, line : 5, snapToLines : true },
38 { align : "middle", position : 60, line : -3, snapToLines : true } 38 { align : "middle", position : 60, line : -3, snapToLines : true }
39 ]; 39 ];
40 var properties = [ "align", "position", "line", "snapToLines" ];
41 40
42 assert_cues_match(video.textTracks[index].cues, expected, properties); 41 assert_cues_match(video.textTracks[index].cues, expected);
43 } 42 }
44 43
45 function testTrackError(index) { 44 function testTrackError(index) {
46 var expected = [ 45 var expected = [
47 { align : "middle", position : "auto", line : "auto", snapToLines : true }, 46 { align : "middle", position : "auto", line : "auto", snapToLines : true },
48 { align : "end", position : 0, line : "auto", snapToLines : true }, 47 { align : "end", position : 0, line : "auto", snapToLines : true },
49 { align : "middle", position : 60, line : -3, snapToLines : true } 48 { align : "middle", position : 60, line : -3, snapToLines : true }
50 ]; 49 ];
51 var properties = [ "align", "position", "line", "snapToLines" ];
52 50
53 assert_cues_match(video.textTracks[index].cues, expected, properties); 51 assert_cues_match(video.textTracks[index].cues, expected);
54 } 52 }
55 }); 53 });
56 </script> 54 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698