tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

track-webvtt-blank-lines.html (1112B)


      1 <!DOCTYPE html>
      2 <title>Cues are affected neither by multiple newlines \n, \r, and \r\n nor by the absence of a seperating line</title>
      3 <script src="track-helpers.js"></script>
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script>
      7 check_cues_from_track("resources/cues.vtt", function(track) {
      8    var expected = [
      9        { id: "1", startTime: 0, endTime: 30.5, text: "Bear is Coming!!!!!" },
     10        { id: "2", startTime: 31, endTime: 60.5, text: "I said Bear is coming!!!!" },
     11        { id: "3", startTime: 61, endTime: 361200.5, text: "I said Bear is coming now!!!!" }
     12    ];
     13 
     14    assert_cues_match(track.cues, expected);
     15 });
     16 
     17 check_cues_from_track("resources/cues-no-separation.vtt", function(track) {
     18    var expected = [
     19        { id: "1", startTime: 0, endTime: 30.5, text: "Bear is Coming!!!!!\n2" },
     20        { id: "", startTime: 31, endTime: 60.5, text: "I said Bear is coming!!!!" },
     21        { id: "", startTime: 61, endTime: 361200.5, text: "I said Bear is coming now!!!!" }
     22    ];
     23 
     24    assert_cues_match(track.cues, expected);
     25 });
     26 </script>