layout/generic/test/test_bug508115.xul

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/generic/test/test_bug508115.xul	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,66 @@
     1.4 +<?xml version="1.0"?>
     1.5 +<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
     1.6 +<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
     1.7 +<!--
     1.8 +https://bugzilla.mozilla.org/show_bug.cgi?id=508115
     1.9 +-->
    1.10 +<window title="Mozilla Bug 508115"
    1.11 +  onload="setTimeout(doTest, 0)"
    1.12 +  xmlns:html="http://www.w3.org/1999/xhtml"
    1.13 +  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    1.14 +
    1.15 +  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
    1.16 +  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
    1.17 +<body  xmlns="http://www.w3.org/1999/xhtml">
    1.18 +  <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=508115">Mozilla Bug 508115</a>
    1.19 +
    1.20 +  <p id="display"></p>
    1.21 +<div id="content" style="display: none">
    1.22 +</div>
    1.23 +</body>
    1.24 +<script class="testbody" type="application/javascript"><![CDATA[
    1.25 +function doTest() {
    1.26 +  document.getElementById("panel").style.display = '';
    1.27 +  document.getElementById("deck").selectedIndex = 1;
    1.28 +  document.getElementById("anchor").open = true;
    1.29 +  document.getElementById("container").style.width = "0";
    1.30 +  document.getElementById("anchor2").open = true;
    1.31 +}
    1.32 +var count = 0;
    1.33 +function shown(id) {
    1.34 +  ok(true, "Shown popup " + id);
    1.35 +  ++count;
    1.36 +  if (count >= 2) {
    1.37 +    SimpleTest.finish();
    1.38 +  }
    1.39 +}
    1.40 +SimpleTest.waitForExplicitFinish();
    1.41 +]]></script>
    1.42 +<deck id="deck" style="margin:50px;">
    1.43 +  <vbox></vbox>
    1.44 +  <vbox id="panel" style="display:none">
    1.45 +    <vbox>
    1.46 +    <menulist id="anchor">
    1.47 +      <menupopup id="popup" onpopupshown="shown('anchor')">
    1.48 +        <menuitem label="One"/>
    1.49 +        <menuitem label="Two"/>
    1.50 +        <menuitem label="Three"/>
    1.51 +      </menupopup>
    1.52 +    </menulist>
    1.53 +    </vbox>
    1.54 +  </vbox>
    1.55 +</deck>
    1.56 +<description>
    1.57 +<html:div id="container">
    1.58 +  <html:span id="span" style="-moz-transform: translate(0,0)">Hello Kitty
    1.59 +    <menulist id="anchor2" style="display:-moz-inline-box;">
    1.60 +      <menupopup id="popup" onpopupshown="shown('anchor2')">
    1.61 +        <menuitem label="One"/>
    1.62 +        <menuitem label="Two"/>
    1.63 +        <menuitem label="Three"/>
    1.64 +      </menupopup>
    1.65 +    </menulist>
    1.66 +  </html:span>
    1.67 +</html:div>
    1.68 +</description>
    1.69 +</window>

mercurial