gecko/toolkit/content/tests/widgets/test_radio.xul
2007-08-07 10:03:44 -07:00

48 lines
1.6 KiB
XML

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
<!--
XUL Widget Test for radio buttons
-->
<window title="Radio Buttons" width="500" height="600"
onload="setTimeout(test_radio, 0);"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<script type="application/javascript" src="xul_selectcontrol.js"/>
<radiogroup id="radiogroup"/>
<radiogroup id="radiogroup-initwithvalue" value="two">
<radio label="One" value="one"/>
<radio label="Two" value="two"/>
<radio label="Three" value="three"/>
</radiogroup>
<radiogroup id="radiogroup-initwithselected" value="two">
<radio label="One" value="one"/>
<radio label="Two" value="two"/>
<radio label="Three" value="three" selected="true"/>
</radiogroup>
<!-- test resuls are displayed in the html:body -->
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<!-- test code goes here -->
<script type="application/javascript"><![CDATA[
SimpleTest.waitForExplicitFinish();
function test_radio()
{
var element = document.getElementById("radiogroup");
test_nsIDOMXULSelectControlElement(element, "radio", null);
test_nsIDOMXULSelectControlElement_UI(element, null);
SimpleTest.finish();
}
]]>
</script>
</window>