tor-browser

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

test_bug378670.html (1339B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=378670
      5 -->
      6 <head>
      7  <title>Test for Bug 378670</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=378670">Mozilla Bug 378670</a>
     14 <p id="display"></p>
     15 <div id="content" style="display: none">
     16  
     17 </div>
     18 Clicking on the select should not crash Mozilla
     19 <select id="select">
     20 <option>1</option>
     21 <option>2</option>
     22 </select>
     23 
     24 <pre id="test">
     25 <script>
     26 document.body.addEventListener('popupshowing', function(e) {e.target.remove() }, true);
     27 </script>
     28 <script type="application/javascript">
     29 
     30 /** Test for Bug 378670 */
     31 
     32 SimpleTest.waitForExplicitFinish();
     33 SimpleTest.requestFlakyTimeout("untriaged");
     34 
     35 function clickit() {
     36  var select = document.getElementById('select');
     37 
     38  sendMouseEvent({type:'mousedown'}, select);
     39  sendMouseEvent({type:'mouseup'}, select);
     40  sendMouseEvent({type:'click'}, select);
     41 
     42  setTimeout(finish, 200);
     43 }
     44 
     45 window.addEventListener('load', clickit);
     46 
     47 function finish()
     48 {
     49  ok(true, "This is a mochikit version of a crash test. To complete is to pass.");
     50  SimpleTest.finish();
     51 }
     52 </script>
     53 </pre>
     54 </body>
     55 </html>