tor-browser

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

test_bug598833-1.html (1281B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=598833
      5 -->
      6 <head>
      7  <title>Test for Bug 598833</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=598833">Mozilla Bug 598833</a>
     13 <p id="display">
     14  <fieldset disabled>
     15    <select id="s" multiple required>
     16      <option>one</option>
     17    </select>
     18  </fieldset>
     19 </p>
     20 <div id="content" style="display: none">
     21  
     22 </div>
     23 <pre id="test">
     24 <script type="application/javascript">
     25 
     26 /** Test for Bug 598833 */
     27 var s = $("s");
     28 is(s.matches(":invalid"), false, "Disabled select should not be invalid");
     29 is(s.matches(":valid"), false, "Disabled select should not be valid");
     30 var p = s.parentNode;
     31 p.removeChild(s);
     32 is(s.matches(":invalid"), true,
     33   "Required valueless select not in tree should be invalid");
     34 is(s.matches(":valid"), false,
     35   "Required valueless select not in tree should not be valid");
     36 p.appendChild(s);
     37 p.disabled = false;
     38 is(s.matches(":invalid"), true,
     39   "Required valueless select should be invalid");
     40 is(s.matches(":valid"), false,
     41   "Required valueless select should not be valid");
     42 </script>
     43 </pre>
     44 </body>
     45 </html>