tor-browser

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

test_window_focus_by_close_and_open.html (914B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <title>test for window focus by window.close() and window.open()</title>
      6 <script src="/tests/SimpleTest/SimpleTest.js"></script>
      7 <link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
      8 <script>
      9 SimpleTest.waitForExplicitFinish();
     10 
     11 function start() {
     12  var w = window.open("file_window_focus_by_close_and_open.html", "_blank");
     13  w.finished = function() {
     14    ok(true, "1st new window had focus");
     15    w.close();
     16    w = window.open("file_window_focus_by_close_and_open.html", "_blank");
     17    w.finished = function() {
     18      ok(true, "2nd new window had focus");
     19      w.close();
     20      SimpleTest.finish();
     21    };
     22  };
     23 }
     24 </script>
     25 </head>
     26 <body onload="setTimeout(start)">
     27 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1695135">Mozilla Bug 1695135</a>
     28 <p id="display"></p>
     29 <div id="content"></div>
     30 <pre id="test"></pre>
     31 </body>
     32 </html>