tor-browser

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

HTMLLegendElement.html (1544B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>HTML Test: HTMLLegendElement</title>
      4 <link rel="author" title="Intel" href="http://www.intel.com/">
      5 <link rel="help" title="4.10.17 The legend element" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-legend-element">
      6 <script src="/resources/testharness.js"></script>
      7 <script src="/resources/testharnessreport.js"></script>
      8 <div id="log"></div>
      9 <div style="display:none">
     10  <form>
     11    <legend id="lgd1">test</legend>
     12  </form>
     13  <form id="fm">
     14    <fieldset id="fs">
     15      <legend id="lgd2">test</legend>
     16    </fieldset>
     17  </form>
     18 </div>
     19 <script>
     20  test(function() {
     21    assert_equals(document.getElementById("lgd1").form, null,
     22                  "The legend.form return null if it has no fieldset parent.");
     23  }, "The legend.form return null when it has no fieldset parent");
     24 
     25  test(function() {
     26    assert_equals(document.getElementById("lgd2").form, document.getElementById("fs").form,
     27                  "The legend.form should be same as fieldset.form.");
     28    assert_equals(document.getElementById("lgd2").form, document.getElementById("fm"),
     29                  "The legend.form should be the correct form.");
     30  }, "The legend.form must be same value as fieldset.form");
     31 
     32  test(function() {
     33    assert_true(document.getElementById("lgd1") instanceof HTMLLegendElement, "legend should be a HTMLLegendElement");
     34    assert_readonly(document.getElementById("lgd1"), "form", "The form is not readonly");
     35  }, "Interface HTMLLegendElement");
     36 </script>