tor-browser

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

track-webvtt-cue-identifiers.html (1205B)


      1 <!DOCTYPE html>
      2 <title>Any text other than "-->" is recognized as optional cue identifier</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/cue-id.vtt", function(track) {
      8    var expected = [
      9        { id: "random_id", startTime: 0, endTime: 30.5, text: "Bear is Coming!!!!!" },
     10        { id: "another random identifier", startTime: 31, endTime: 60.5, text: "I said Bear is coming!!!!" },
     11        { id: "identifier--too", startTime: 61, endTime: 120.5, text: "I said Bear is coming now!!!!" },
     12        { id: "identifier--too", startTime: 121, endTime: 180.5, text: "Duplicate identifier" }
     13    ];
     14 
     15    assert_cues_match(track.cues, expected);
     16 });
     17 
     18 check_cues_from_track("resources/cue-id-error.vtt", function(track) {
     19    var expected = [
     20        { id: "", startTime: 0, endTime: 30.5, text: "Bear is Coming!!!!!" },
     21        { id: "", startTime: 31, endTime: 60.5, text: "I said Bear is coming!!!!" },
     22        { id: "", startTime: 61, endTime: 1200.5, text: "I said Bear is coming now!!!!" }
     23    ];
     24 
     25    assert_cues_match(track.cues, expected);
     26 });
     27 </script>