tor-browser

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

test_bug454235.xhtml (1268B)


      1 <?xml version="1.0"?>
      2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
      3 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
      4 <!--
      5 https://bugzilla.mozilla.org/show_bug.cgi?id=454235
      6 -->
      7 <window title="Mozilla Bug 454235"
      8  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
      9  <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
     10 
     11  <!-- test results are displayed in the html:body -->
     12  <body xmlns="http://www.w3.org/1999/xhtml">
     13  <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=454235"
     14     target="_blank">Mozilla Bug 454235</a>
     15  </body>
     16 
     17  <!-- test code goes here -->
     18  <script type="application/javascript"><![CDATA[
     19 
     20    /** Test for Bug 454235 */
     21 SimpleTest.waitForExplicitFinish();
     22 
     23 SimpleTest.waitForFocus(doTest);
     24 
     25 function doTest() {
     26  var hiddenBrowser = document.getElementById("hiddenBrowser");
     27 
     28  hiddenBrowser.contentWindow.focus();
     29  ok(!hiddenBrowser.contentDocument.hasFocus(), "hidden browser is unfocusable");
     30 
     31  SimpleTest.finish();
     32 }
     33 
     34 
     35 
     36  ]]></script>
     37  <box flex="1" style="visibility: hidden; border:5px black solid">
     38    <browser style="border:5px blue solid" id="hiddenBrowser" src="bug454235-subframe.xhtml"/>
     39  </box>
     40 </window>