OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <title>Tests WebVTT settings.</title> | 2 <title>Tests WebVTT 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 <script> | 6 <script> |
7 check_cues_from_track("captions-webvtt/tc013-settings.vtt", function(track) { | 7 check_cues_from_track("captions-webvtt/tc013-settings.vtt", function(track) { |
8 var expected = [ | 8 var expected = [ |
9 { line: 100, position: "auto", align: "start", vertical: "" }, | 9 { line: 100, position: "auto", align: "start", vertical: "" }, |
10 { line: 15, position: 40, align: "middle", vertical: "rl" }, | 10 { line: 15, position: 40, align: "center", vertical: "rl" }, |
11 { line: "auto", position: 10, align: "middle", vertical: "" }, | 11 { line: "auto", position: 10, align: "center", vertical: "" }, |
12 { line: 95, position: "auto", align: "end", vertical: "lr" } | 12 { line: 95, position: "auto", align: "end", vertical: "lr" } |
13 ]; | 13 ]; |
14 | 14 |
15 assert_cues_match(track.cues, expected); | 15 assert_cues_match(track.cues, expected); |
16 }); | 16 }); |
17 | 17 |
18 check_cues_from_track("captions-webvtt/tc013-settings-bad-separation.vtt", funct
ion(track) { | 18 check_cues_from_track("captions-webvtt/tc013-settings-bad-separation.vtt", funct
ion(track) { |
19 var expected = [ | 19 var expected = [ |
20 { line: 43, position: 10, align: "middle", vertical: "" }, | 20 { line: 43, position: 10, align: "center", vertical: "" }, |
21 { line: "auto", position: 50, align: "end", vertical: "" }, | 21 { line: "auto", position: 50, align: "end", vertical: "" }, |
22 { line: "auto", position: "auto", align: "middle", vertical: "" }, | 22 { line: "auto", position: "auto", align: "center", vertical: "" }, |
23 { line: "auto", position: 90, align: "middle", vertical: "lr" } | 23 { line: "auto", position: 90, align: "center", vertical: "lr" } |
24 ]; | 24 ]; |
25 | 25 |
26 assert_cues_match(track.cues, expected); | 26 assert_cues_match(track.cues, expected); |
27 }); | 27 }); |
28 </script> | 28 </script> |
OLD | NEW |