summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/embedded-content/media-elements/track/track-element/track-webvtt-blank-lines.html
blob: 114aebc38c321085410465817ef10954f48ea06f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<!DOCTYPE html>
<title>Cues are affected neither by multiple newlines \n, \r, and \r\n nor by the absence of a seperating line</title>
<script src="track-helpers.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
check_cues_from_track("resources/cues.vtt", function(track) {
    var expected = [
        { id: "1", startTime: 0, endTime: 30.5, text: "Bear is Coming!!!!!" },
        { id: "2", startTime: 31, endTime: 60.5, text: "I said Bear is coming!!!!" },
        { id: "3", startTime: 61, endTime: 361200.5, text: "I said Bear is coming now!!!!" }
    ];

    assert_cues_match(track.cues, expected);
});

check_cues_from_track("resources/cues-no-separation.vtt", function(track) {
    var expected = [
        { id: "1", startTime: 0, endTime: 30.5, text: "Bear is Coming!!!!!\n2" },
        { id: "", startTime: 31, endTime: 60.5, text: "I said Bear is coming!!!!" },
        { id: "", startTime: 61, endTime: 361200.5, text: "I said Bear is coming now!!!!" }
    ];

    assert_cues_match(track.cues, expected);
});
</script>