tor-browser

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

test_bug858459.html (1708B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=858459
      5 -->
      6 <head>
      7  <meta charset="utf-8">
      8  <title>Test for Bug 858459</title>
      9  <script src="/tests/SimpleTest/SimpleTest.js"></script>
     10  <script src="/tests/SimpleTest/EventUtils.js"></script>
     11  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     12  <script type="application/javascript">
     13 
     14  /** Test for Bug 858459 */
     15 
     16 var result = "";
     17 var timeout = null;
     18 var clicks = 0;
     19 const EXPECTED_RESULT = "change select";
     20 
     21 function logEvent(ev,msg) {
     22  result += ev.type + ' ' + msg;
     23  ++clicks;
     24  if (result.length > EXPECTED_RESULT.length)
     25    finishTest();
     26 }
     27 
     28 document.onclick = function(event) { logEvent(event,"document"); }
     29 
     30 SimpleTest.waitForExplicitFinish();
     31 SimpleTest.requestFlakyTimeout("untriaged");
     32 
     33 function finishTest() {
     34  if (!timeout) return;
     35  clearTimeout(timeout);
     36  timeout = null;
     37  is(result,EXPECTED_RESULT,"");
     38  SimpleTest.finish();
     39 }
     40 
     41 function runTest() {
     42  // Need a timeout to check that an event has _not_ occurred.
     43  timeout = setTimeout(finishTest, 5000);
     44  synthesizeMouseAtCenter(document.getElementById('test858459'), { });
     45 }
     46 
     47  </script>
     48 </head>
     49 <body onload="SimpleTest.waitForFocus(runTest)">
     50 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=858459">Mozilla Bug 858459</a>
     51 <p id="display"></p>
     52 <div id="content" style="display: none">
     53 
     54 </div>
     55 <pre id="test"><div><select id="test858459" size=4 onclick="logEvent(event,'select');" onchange="logEvent(event,'select');var div = document.querySelector('#test div'); div.innerHTML='<p>'+div.innerHTML; document.body.offsetHeight;"><option>1111111111111111<option>2<option>3</select></div>
     56 
     57 </pre>
     58 </body>
     59 </html>