tor-browser

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

test_bug622246.html (1442B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=622246
      5 -->
      6 <head>
      7  <title>Test for Bug 622246</title>
      8  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      9  <script src="/tests/SimpleTest/EventUtils.js"></script>
     10  <script src="/tests/SimpleTest/paint_listener.js"></script>
     11  <script src="/tests/gfx/layers/apz/test/mochitest/apz_test_utils.js"></script>
     12  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     13 </head>
     14 <body>
     15 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=622246">Mozilla Bug 622246</a>
     16 <p id="display">
     17  <iframe id="testframe"
     18          srcdoc="<span onclick='this.parentNode.removeChild(this)'><a href='PASS.html'>Click me</a></span>">
     19  </iframe>
     20 </p>
     21 <div id="content" style="display: none">
     22 
     23 </div>
     24 <pre id="test">
     25 <script type="application/javascript">
     26 
     27 /** Test for Bug 622246 */
     28 SimpleTest.waitForExplicitFinish();
     29 
     30 const { testframe } = document.all;
     31 
     32 waitUntilApzStable().then(async () => {
     33  testframe.onload = function() {
     34    is(this.contentDocument.documentElement.innerText, "PASS", "Should have loaded link");
     35    SimpleTest.finish();
     36  };
     37 
     38  is(testframe.contentDocument.readyState, "complete", "iframe is not loaded yet?");
     39 
     40  var win = testframe.contentWindow;
     41  await SimpleTest.promiseFocus(win);
     42 
     43  var a = win.document.getElementsByTagName("a")[0];
     44  synthesizeMouseAtCenter(a, {}, win);
     45 });
     46 </script>
     47 </pre>
     48 </body>
     49 </html>