Bug 508115. Test

This commit is contained in:
Robert O'Callahan 2009-08-05 21:29:33 +12:00
parent 79d0b07e8b
commit a981cba29c
4 changed files with 69 additions and 49 deletions

View File

@ -1,48 +0,0 @@
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
onload="setTimeout(doTest, 0)"
class="reftest-wait">
<script class="testbody" type="application/javascript"><![CDATA[
function doTest() {
document.getElementById("panel").style.display = '';
document.getElementById("deck").selectedIndex = 1;
document.getElementById("anchor").open = true;
document.getElementById("container").style.width = "0";
document.getElementById("anchor2").open = true;
}
var count = 0;
function shown() {
++count;
if (count >= 2) {
document.documentElement.removeAttribute("class");
}
}
]]></script>
<deck id="deck" style="margin:50px;">
<vbox></vbox>
<vbox id="panel" style="display:none">
<vbox>
<menulist id="anchor">
<menupopup id="popup" onpopupshown="shown()">
<menuitem label="One"/>
<menuitem label="Two"/>
<menuitem label="Three"/>
</menupopup>
</menulist>
</vbox>
</vbox>
</deck>
<description>
<html:div id="container">
<html:span id="span" style="-moz-transform: translate(0,0)">Hello Kitty
<menulist id="anchor2" style="display:-moz-inline-box;">
<menupopup id="popup" onpopupshown="shown()">
<menuitem label="One"/>
<menuitem label="Two"/>
<menuitem label="Three"/>
</menupopup>
</menulist>
</html:span>
</html:div>
</description>
</window>

View File

@ -271,6 +271,5 @@ load 503961-1.xhtml
load 503961-2.html
load 508908-1.html
load 505912-1.html
# load 508115-1.html
load 511482.html
load 517968.html

View File

@ -88,6 +88,7 @@ _TEST_FILES = \
test_bug469774.xul \
test_bug470212.html \
test_bug503813.html \
test_bug508115.xul \
$(warning test_bug507902.html temporarily disabled - see bug 510001) \
test_bug514732.html \
test_movement_by_characters.html \

View File

@ -0,0 +1,68 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=508115
-->
<window title="Mozilla Bug 508115"
onload="setTimeout(doTest, 0)"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<title>Test for Bug 508115</title>
<script type="application/javascript" src="/MochiKit/packed.js" />
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"/>
<body xmlns="http://www.w3.org/1999/xhtml">
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=508115">Mozilla Bug 508115</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
</body>
<script class="testbody" type="application/javascript"><![CDATA[
function doTest() {
document.getElementById("panel").style.display = '';
document.getElementById("deck").selectedIndex = 1;
document.getElementById("anchor").open = true;
document.getElementById("container").style.width = "0";
document.getElementById("anchor2").open = true;
}
var count = 0;
function shown(id) {
ok(true, "Shown popup " + id);
++count;
if (count >= 2) {
SimpleTest.finish();
}
}
SimpleTest.waitForExplicitFinish();
]]></script>
<deck id="deck" style="margin:50px;">
<vbox></vbox>
<vbox id="panel" style="display:none">
<vbox>
<menulist id="anchor">
<menupopup id="popup" onpopupshown="shown('anchor')">
<menuitem label="One"/>
<menuitem label="Two"/>
<menuitem label="Three"/>
</menupopup>
</menulist>
</vbox>
</vbox>
</deck>
<description>
<html:div id="container">
<html:span id="span" style="-moz-transform: translate(0,0)">Hello Kitty
<menulist id="anchor2" style="display:-moz-inline-box;">
<menupopup id="popup" onpopupshown="shown('anchor2')">
<menuitem label="One"/>
<menuitem label="Two"/>
<menuitem label="Three"/>
</menupopup>
</menulist>
</html:span>
</html:div>
</description>
</window>