test_bug508115.xhtml (2108B)
1 <?xml version="1.0"?> 2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?> 3 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?> 4 <!-- 5 https://bugzilla.mozilla.org/show_bug.cgi?id=508115 6 --> 7 <window title="Mozilla Bug 508115" 8 onload="setTimeout(doTest, 0)" 9 xmlns:html="http://www.w3.org/1999/xhtml" 10 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> 11 12 <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/> 13 <script src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/> 14 <body xmlns="http://www.w3.org/1999/xhtml"> 15 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=508115">Mozilla Bug 508115</a> 16 17 <p id="display"></p> 18 <div id="content" style="display: none"> 19 </div> 20 </body> 21 <script class="testbody" type="application/javascript"><![CDATA[ 22 function doTest() { 23 document.getElementById("panel").style.display = ''; 24 document.getElementById("deck").selectedIndex = 1; 25 document.getElementById("anchor").open = true; 26 document.getElementById("container").style.width = "0"; 27 document.getElementById("anchor2").open = true; 28 } 29 var count = 0; 30 function shown(id) { 31 ok(true, "Shown popup " + id); 32 ++count; 33 if (count >= 2) { 34 SimpleTest.finish(); 35 } 36 } 37 SimpleTest.waitForExplicitFinish(); 38 ]]></script> 39 <deck id="deck" style="margin:50px;"> 40 <vbox></vbox> 41 <vbox id="panel" style="display:none"> 42 <vbox> 43 <menulist id="anchor"> 44 <menupopup id="popup" onpopupshown="shown('anchor')"> 45 <menuitem label="One"/> 46 <menuitem label="Two"/> 47 <menuitem label="Three"/> 48 </menupopup> 49 </menulist> 50 </vbox> 51 </vbox> 52 </deck> 53 <description> 54 <html:div id="container"> 55 <html:span id="span" style="transform: translate(0,0)">Hello Kitty 56 <menulist id="anchor2" style="display:-moz-inline-box;"> 57 <menupopup id="popup" onpopupshown="shown('anchor2')"> 58 <menuitem label="One"/> 59 <menuitem label="Two"/> 60 <menuitem label="Three"/> 61 </menupopup> 62 </menulist> 63 </html:span> 64 </html:div> 65 </description> 66 </window>