tor-browser

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

default-properties-on-semantics-and-maction.html (1560B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <title>Default properties on &lt;semantics&gt; and &lt;maction&gt;</title>
      6 <link rel="help" href="https://w3c.github.io/mathml-core/#semantics-and-presentation">
      7 <link rel="help" href="https://w3c.github.io/mathml-core/#enlivening-expressions">
      8 <link rel="help" href="https://w3c.github.io/mathml-core/#user-agent-stylesheet">
      9 <meta name="assert" content="Test that only the first children of semantics/maction are displayed.">
     10 <script src="/resources/testharness.js"></script>
     11 <script src="/resources/testharnessreport.js"></script>
     12 </head>
     13 <body>
     14  <div id="log"></div>
     15  <div>
     16    <math>
     17      <semantics>
     18        <mn>1</mn>
     19        <mn>2</mn>
     20        <mn>3</mn>
     21        <mn>4</mn>
     22        <mn>5</mn>
     23      </semantics>
     24      <maction>
     25        <mn>1</mn>
     26        <mn>2</mn>
     27        <mn>3</mn>
     28        <mn>4</mn>
     29        <mn>5</mn>
     30      </maction>
     31    </math>
     32  </div>
     33 
     34  <script>
     35    ["semantics", "maction"].forEach(name => {
     36      let element = document.getElementsByTagName(name)[0];
     37      test(() => {
     38        let child = element.firstElementChild;
     39        assert_not_equals(window.getComputedStyle(child).display, "none", `Child ${child.innerText} does not have display: none`);
     40        for (child = child.nextElementSibling; child; child = child.nextElementSibling) {
     41          assert_equals(window.getComputedStyle(child).display, "none", `Child ${child.innerText} has display: none`);
     42        }
     43      }, `Display value of children of the <${name}> element`);
     44    });
     45  </script>
     46 </body>
     47 </html>