gecko/toolkit/themes/pinstripe/tests/test_bug371080.xul

61 lines
2.0 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"?>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=371080
-->
<window title="Mozilla Bug 371080"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
align="start">
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<body xmlns="http://www.w3.org/1999/xhtml">
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=371080">Mozilla Bug 371080</a>
</body>
<!-- This Mac OS X native button should be 68 pixels wide from
the dark border line on the left to the dark border line on
the right. It should be 21 pixels tall from the dark border
line on the top to the dark border line on the bottom -->
<button class="bigbutton"
label="OK"
width="5"
id="button1"
height="5"/>
<script class="testbody" type="application/javascript">
<![CDATA[
dump("\n\nTEST DEBUG: start of script block\n");
dump("TEST DEBUG: SimpleTest: " + SimpleTest + "\n");
/** Test for Bug 371080 **/
SimpleTest.waitForExplicitFinish();
function checkButtonDimensions() {
dump("TEST DEBUG: start of checkButtonDimensions\n");
dump("TEST DEBUG: SimpleTest: " + SimpleTest + "\n");
dump("TEST DEBUG: function 'is()' defined as: " + is + "\n");
try {
is($("button1").boxObject.width, 79, "mac button width");
is($("button1").boxObject.height, 22, "mac button height");
} catch (ex) {
dump("TEST DEBUG: " + ex + "\n");
}
dump("TEST DEBUG: end of checkButtonDimensions\n");
}
addLoadEvent(function(){ dump("TEST DEBUG: load event reached\n"); } );
addLoadEvent(checkButtonDimensions);
addLoadEvent(function(){ dump("TEST DEBUG: load event after checkButtonDimensions\n"); } );
addLoadEvent(SimpleTest.finish);
dump("TEST DEBUG: end of script block\n\n");
]]>
</script>
</window>