tor-browser

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

test_bug345521.html (994B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=345521
      5 -->
      6 <head>
      7  <title>Test for Bug 345521</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=345521">Mozilla Bug 345521</a>
     13 <p id="display"></p>
     14 <div id="content" style="display: none">
     15  <a id="testlink" onclick="return 0">test</a><br />
     16 </div>
     17 <pre id="test">
     18 <script class="testbody" type="text/javascript">
     19 
     20 /** Test for Bug 345521 */
     21 function hitlink() {
     22  var evt = document.createEvent("MouseEvents");
     23  evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
     24  var isOk = $("testlink").dispatchEvent(evt);
     25  ok(isOk, "return 0 should not cancel an event");
     26  SimpleTest.finish();
     27 }
     28 
     29 SimpleTest.waitForExplicitFinish();
     30 addLoadEvent(hitlink);
     31 
     32 </script>
     33 </pre>
     34 </body>
     35 </html>