tor-browser

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

track-webvtt-settings.html (1079B)


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