tor-browser

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

test_bug390975.html (1364B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=390975
      5 -->
      6 <head>
      7  <title>Test for Bug 390975</title>
      8  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      9  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     10 </head>
     11 <body>
     12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=390975">Mozilla Bug 390975</a>
     13 <p id="display"></p>
     14 <div id="content" style="display: none">
     15  <table id="table1">
     16    <form id="form1">
     17      <input>
     18      <input>
     19     <tr><td>
     20       <input>
     21       <input>
     22       <input>
     23     </td></tr>
     24    </form>
     25  </table>
     26 
     27  <table id="table2">
     28    <form id="form2">
     29      <input>
     30      <input>
     31     <tr id="row2"><td>
     32       <input>
     33       <input>
     34       <input>
     35     </td></tr>
     36    </form>
     37  </table>
     38 </div>
     39 <pre id="test">
     40 <script class="testbody" type="text/javascript">
     41 
     42 /** Test for Bug 390975 */
     43 var form = $("form1");
     44 is(form.elements.length, 5, "Unexpected elements length");
     45 
     46 $("table1").remove();
     47 is(form.elements.length, 3, "Should have lost control outside table");
     48 
     49 form.remove();
     50 is(form.elements.length, 0, "Should have lost control outside form");
     51 
     52 form = $("form2");
     53 is(form.elements.length, 5, "Unexpected elements length");
     54 
     55 $("row2").remove();
     56 is(form.elements.length, 2, "Should have lost controls inside table row");
     57 </script>
     58 </pre>
     59 </body>
     60 </html>