widget/tests/window_bug429954.xul

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/widget/tests/window_bug429954.xul	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,45 @@
     1.4 +<?xml version="1.0"?>
     1.5 +<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
     1.6 +<window title="Mozilla Bug 478536"
     1.7 +  onload="start();"
     1.8 +  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
     1.9 +
    1.10 +  <script type="application/javascript"
    1.11 +          src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js" />
    1.12 +
    1.13 +<body xmlns="http://www.w3.org/1999/xhtml" id="body">
    1.14 +</body>
    1.15 +
    1.16 +<script class="testbody" type="application/javascript">
    1.17 +<![CDATA[
    1.18 +
    1.19 +function ok(aCondition, aMessage)
    1.20 +{
    1.21 +  window.opener.wrappedJSObject.SimpleTest.ok(aCondition, aMessage);
    1.22 +}
    1.23 +
    1.24 +function is(aLeft, aRight, aMessage)
    1.25 +{
    1.26 +  window.opener.wrappedJSObject.SimpleTest.is(aLeft, aRight, aMessage);
    1.27 +}
    1.28 +
    1.29 +function isnot(aLeft, aRight, aMessage)
    1.30 +{
    1.31 +  window.opener.wrappedJSObject.SimpleTest.isnot(aLeft, aRight, aMessage);
    1.32 +}
    1.33 +
    1.34 +function start() {
    1.35 +  var oldWidth = window.outerWidth, oldHeight = window.outerHeight;
    1.36 +  window.maximize();
    1.37 +  window.restore();
    1.38 +  is(window.outerWidth, oldWidth, "wrong window width after maximize+restore");
    1.39 +  is(window.outerHeight, oldHeight, "wrong window height after maximize+restore");
    1.40 +  window.opener.wrappedJSObject.SimpleTest.finish();
    1.41 +  window.close();
    1.42 +}
    1.43 +
    1.44 +
    1.45 +]]>
    1.46 +</script>
    1.47 +
    1.48 +</window>

mercurial