widget/tests/window_bug593307_centerscreen.xul

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/widget/tests/window_bug593307_centerscreen.xul	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,27 @@
     1.4 +<?xml version="1.0"?>
     1.5 +<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
     1.6 +<window title="Mozilla Bug 593307"
     1.7 +  width="100" height="100"
     1.8 +  onload="onload();"
     1.9 +  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    1.10 +
    1.11 +  <script type="application/javascript"
    1.12 +          src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js" />
    1.13 +
    1.14 +<body xmlns="http://www.w3.org/1999/xhtml" id="body">
    1.15 +</body>
    1.16 +
    1.17 +<script class="testbody" type="application/javascript">
    1.18 +<![CDATA[
    1.19 +
    1.20 +function onload()
    1.21 +{
    1.22 +  var SimpleTest = window.opener.SimpleTest;
    1.23 +  SimpleTest.ok(window.screenX >= 0, "centerscreen window should not start offscreen (X coordinate)");
    1.24 +  SimpleTest.ok(window.screenY >= 0, "centerscreen window should not start offscreen (Y coordinate)");
    1.25 +  window.opener.finished();
    1.26 +}
    1.27 +]]>
    1.28 +</script>
    1.29 +
    1.30 +</window>

mercurial