tor-browser

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

fieldset-content-before-legend.html (1092B)


      1 <!doctype html>
      2 <title>fieldset content before legend</title>
      3 <script src=/resources/testharness.js></script>
      4 <script src=/resources/testharnessreport.js></script>
      5 <style>
      6 fieldset {
      7  /* Paddings might have fractional values by default, and they can cause
      8     rounding differences between the test element and the reference element. */
      9  padding: 0;
     10 }
     11 </style>
     12 
     13 <fieldset id=test>
     14  X
     15  <legend>legend</legend>
     16  Y
     17 </fieldset>
     18 <fieldset id=ref>
     19  <legend>legend</legend>
     20  X Y
     21 </fieldset>
     22 
     23 <fieldset id="test2">
     24  P<span id="hidden" style="display:none;">AS</span><legend>legend</legend>S
     25 </fieldset>
     26 
     27 <script>
     28  test(() => {
     29    const testElm = document.getElementById('test');
     30    const refElm = document.getElementById('ref');
     31    assert_equals(testElm.clientHeight, refElm.clientHeight);
     32  });
     33 
     34  test(() => {
     35    const testElm = document.getElementById('test2');
     36    testElm.clientHeight;
     37    const span = document.getElementById('hidden');
     38    span.style.display = 'inline';
     39    testElm.clientHeight;
     40  }, 'Showing a node just before the rendered legend should not crash');
     41 </script>