OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <title>Tests cue line position from settings.</title> | 2 <title>Tests cue line 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/tc017-line-position.vtt"> | 7 <track src="captions-webvtt/tc017-line-position.vtt"> |
8 <track src="captions-webvtt/tc017-line-position-bad.vtt"> | 8 <track src="captions-webvtt/tc017-line-position-bad.vtt"> |
9 </video> | 9 </video> |
10 <script> | 10 <script> |
(...skipping 21 matching lines...) Expand all Loading... |
32 function testTrack(index) { | 32 function testTrack(index) { |
33 var expected = [ | 33 var expected = [ |
34 { line : 0, snapToLines : false }, | 34 { line : 0, snapToLines : false }, |
35 { line : 0, snapToLines : true }, | 35 { line : 0, snapToLines : true }, |
36 { line : 50, snapToLines : false }, | 36 { line : 50, snapToLines : false }, |
37 { line : 5, snapToLines : true }, | 37 { line : 5, snapToLines : true }, |
38 { line : 100, snapToLines : false }, | 38 { line : 100, snapToLines : false }, |
39 { line : -1, snapToLines : true }, | 39 { line : -1, snapToLines : true }, |
40 { line : 500, snapToLines : true } | 40 { line : 500, snapToLines : true } |
41 ]; | 41 ]; |
42 var properties = [ "line", "snapToLines" ]; | |
43 | 42 |
44 assert_cues_match(video.textTracks[index].cues, expected, properties); | 43 assert_cues_match(video.textTracks[index].cues, expected); |
45 } | 44 } |
46 | 45 |
47 function testTrackError(index) { | 46 function testTrackError(index) { |
48 var expected = [ | 47 var expected = [ |
49 { line : "auto", snapToLines : true }, | 48 { line : "auto", snapToLines : true }, |
50 { line : "auto", snapToLines : true }, | 49 { line : "auto", snapToLines : true }, |
51 { line : "auto", snapToLines : true }, | 50 { line : "auto", snapToLines : true }, |
52 { line : "auto", snapToLines : true }, | 51 { line : "auto", snapToLines : true }, |
53 { line : "auto", snapToLines : true }, | 52 { line : "auto", snapToLines : true }, |
54 { line : "auto", snapToLines : true } | 53 { line : "auto", snapToLines : true } |
55 ]; | 54 ]; |
56 var properties = [ "line", "snapToLines" ]; | |
57 | 55 |
58 assert_cues_match(video.textTracks[index].cues, expected, properties); | 56 assert_cues_match(video.textTracks[index].cues, expected); |
59 } | 57 } |
60 }); | 58 }); |
61 </script> | 59 </script> |
OLD | NEW |