widget/tests/test_bug593307.xul
author Florian Quèze <florian@queze.net>
Wed, 28 Feb 2018 18:51:33 +0100
changeset 405708 7bbd1a09eacb8a31f4caef5c1e526d8d32569ae9
parent 177050 bbdc558a0bb261e2434a6f974cafcd39f544c639
child 428882 0d69b4fb1ed43751cfcbc0b4f2fe3b6a49bc0494
permissions -rw-r--r--
Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop.

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
                 type="text/css"?>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=593307
-->
<window title="Mozilla Bug 593307"
  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

  <script type="application/javascript"
          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />

<body  xmlns="http://www.w3.org/1999/xhtml">
<div id="content" style="display: none">
  
</div>
<pre id="test">
</pre>
</body>

<script class="testbody" type="application/javascript">
<![CDATA[

SimpleTest.waitForExplicitFinish();

function finish() {
  offscreenWindow.close();
  SimpleTest.finish();
}

var mainWindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
                       .getInterface(Ci.nsIWebNavigation)
                       .QueryInterface(Ci.nsIDocShellTreeItem)
                       .rootTreeItem
                       .QueryInterface(Ci.nsIInterfaceRequestor)
                       .getInterface(Ci.nsIDOMWindow);

var offscreenWindow = mainWindow.openDialog("window_bug593307_offscreen.xul", "",
                                            "dialog=no,chrome,width=200,height=200,screenX=-3000,screenY=-3000",
                                            SimpleTest, finish);

]]>
</script>

</window>