tor-browser

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

table-with-border-client-width-height.html (973B)


      1 <!DOCTYPE html>
      2 <title>CSSOM Test: Table with its own specified border's clientWidth/Height</title>
      3 <link rel="help" href="https://www.w3.org/TR/CSS2/tables.html#model" />
      4 <link rel="help" href="https://www.w3.org/TR/CSS2/tables.html#separated-borders" />
      5 <link rel="help" href="https://drafts.csswg.org/cssom-view/#extension-to-the-element-interface" />
      6 <script src=/resources/testharness.js></script>
      7 <script src=/resources/testharnessreport.js></script>
      8 <style>
      9  table {
     10    border: 8px solid #faa;
     11  }
     12 </style>
     13 <table>
     14  <tbody>
     15    <tr>
     16      <td>a</td>
     17      <td>b</td>
     18    </tr>
     19    <tr>
     20      <td>c</td>
     21      <td>d</td>
     22    </tr>
     23  </tbody>
     24 </table>
     25 <script type="text/javascript">
     26  var table = document.getElementsByTagName('table')[0];
     27  test(function() {
     28    assert_equals(table.clientWidth, table.offsetWidth);
     29    assert_equals(table.clientHeight, table.offsetHeight);
     30  }, "Table's clientWidth/Height and OffsetWidth/Height should be the same");
     31 </script>