tor-browser

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

test_bug612730.html (1249B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=612730
      5 -->
      6 <head>
      7  <title>Test for Bug 612730</title>
      8  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      9  <script src="/tests/SimpleTest/EventUtils.js"></script>
     10  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     11 </head>
     12 <body>
     13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=612730">Mozilla Bug 612730</a>
     14 <p id="display"></p>
     15 <div id="content">
     16  <select multiple required>
     17    <option value="">foo</option>
     18    <option value="">bar</option>
     19  </select>
     20 </div>
     21 <pre id="test">
     22 <script type="application/javascript">
     23 
     24 /** Test for Bug 612730 */
     25 
     26 SimpleTest.waitForExplicitFinish();
     27 
     28 function runTest()
     29 {
     30  var select = document.getElementsByTagName('select')[0];
     31 
     32  select.addEventListener("focus", function() {
     33    isnot(select.selectedIndex, -1, "Something should have been selected");
     34 
     35    ok(!select.matches(":-moz-ui-invalid"),
     36       ":-moz-ui-invalid should not apply");
     37    ok(!select.matches(":-moz-ui-valid"),
     38       ":-moz-ui-valid should not apply");
     39 
     40    SimpleTest.finish();
     41  }, {once: true});
     42 
     43  synthesizeMouse(select, 5, 5, {});
     44 }
     45 
     46 SimpleTest.waitForFocus(runTest);
     47 
     48 </script>
     49 </pre>
     50 </body>
     51 </html>