tor-browser

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

positionAlign.html (815B)


      1 <!doctype html>
      2 <title>VTTCue.positionAlign</title>
      3 <link rel="help" href="https://w3c.github.io/webvtt/#dom-vttcue-positionalign">
      4 <script src=/resources/testharness.js></script>
      5 <script src=/resources/testharnessreport.js></script>
      6 <div id=log></div>
      7 <script>
      8 test(function(){
      9    var cue = new VTTCue(0, 1, 'text');
     10    assert_true('positionAlign' in cue, 'positionAlign is not supported');
     11 
     12    ['line-left', 'center', 'line-right', 'auto'].forEach(function(valid) {
     13        cue.positionAlign = valid;
     14        assert_equals(cue.positionAlign, valid);
     15    });
     16 
     17    cue.positionAlign = 'center';
     18    ['auto\u0000', 'centre', 'middle'].forEach(function(invalid) {
     19        cue.positionAlign = invalid;
     20        assert_equals(cue.positionAlign, 'center');
     21    });
     22 }, document.title+', script-created cue');
     23 </script>