layout/base/tests/test_bug465448.xul

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/base/tests/test_bug465448.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 +<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
     1.7 +
     1.8 +<window title="Bug 465448"
     1.9 +  onload="loaded()"
    1.10 +  xmlns:html="http://www.w3.org/1999/xhtml"
    1.11 +  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    1.12 +
    1.13 +  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
    1.14 +  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>      
    1.15 +
    1.16 +<script><![CDATA[
    1.17 +SimpleTest.waitForExplicitFinish();
    1.18 +var loadedCalled = false;
    1.19 +var win = window.open("data:text/html,<body onload='window.opener.loaded()'><div style='height:200px; width:100px;'>", "_blank", "width=600,height=600");
    1.20 +
    1.21 +function loaded() {
    1.22 +  if (!loadedCalled) {
    1.23 +    loadedCalled = true;
    1.24 +    return;
    1.25 +  }
    1.26 +  win.sizeToContent();
    1.27 +  win.sizeToContent();
    1.28 +  win.sizeToContent();
    1.29 +  win.sizeToContent();
    1.30 +  win.sizeToContent();
    1.31 +  win.sizeToContent();
    1.32 +  ok(win.innerWidth >= 100, "innerWidth");
    1.33 +  ok(win.innerHeight >= 200, "innerHeight");
    1.34 +  win.close();
    1.35 +  SimpleTest.finish();
    1.36 +}
    1.37 +]]></script>
    1.38 +
    1.39 +<body xmlns="http://www.w3.org/1999/xhtml">
    1.40 +<p id="display">
    1.41 +</p>
    1.42 +<div id="content" style="display: none">
    1.43 +</div>
    1.44 +<pre id="test">
    1.45 +</pre>
    1.46 +</body>
    1.47 +
    1.48 +</window>

mercurial