tor-browser

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

text-orientation-parsing-001.html (1465B)


      1 <!DOCTYPE html>
      2 <title>CSS Writing Modes: parsing text-orientation</title>
      3 <link rel="author" title="Koji Ishii" href="mailto:kojiishi@gmail.com">
      4 <link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#text-orientation">
      5 <meta name="assert" content="This test asserts the parser and getComputedStyle works correctly for the text-orientation property.">
      6 <meta name="flags" content="dom">
      7 <script src="/resources/testharness.js"></script>
      8 <script src="/resources/testharnessreport.js"></script>
      9 
     10 <div
     11  data-expected="mixed" title="text-orientation initial value"></div>
     12 
     13 <div style="text-orientation: upright"
     14  data-expected="upright"></div>
     15 <div style="text-orientation: sideways"
     16  data-expected="sideways"></div>
     17 
     18 <div style="text-orientation: upright">
     19  <div
     20    data-expected="upright" title="text-orientation should inherit"></div>
     21 
     22  <div style="text-orientation: mixed"
     23    data-expected="mixed"></div>
     24 
     25  <div style="text-orientation: initial"
     26    data-expected="mixed"></div>
     27  <div style="text-orientation: inherit"
     28    data-expected="upright"></div>
     29 
     30  <div style="text-orientation: foo"
     31    data-expected="upright"></div>
     32 </div>
     33 
     34 <script>
     35 Array.prototype.forEach.call(document.querySelectorAll("[data-expected]"), function (element) {
     36  test(function () {
     37    var actual = getComputedStyle(element).textOrientation;
     38    assert_equals(actual, element.dataset.expected);
     39  }, element.title || element.getAttribute("style"));
     40 });
     41 </script>