1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/content/tests/chrome/test_statusbar.xul Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,42 @@ 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 + XUL Widget Test for statusbar 1.9 + --> 1.10 +<window title="Statusbar Test" 1.11 + onload="setTimeout(test_statusbar, 0);" 1.12 + xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> 1.13 + <script type="application/javascript" 1.14 + src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> 1.15 + <script type="application/javascript" 1.16 + src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script> 1.17 + 1.18 +<statusbar> 1.19 + <statusbarpanel id="panel" label="OK" image="happy.png"/> 1.20 +</statusbar> 1.21 + 1.22 + <!-- test results are displayed in the html:body --> 1.23 + <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/> 1.24 + 1.25 + <!-- test code goes here --> 1.26 + <script type="application/javascript"><![CDATA[ 1.27 + 1.28 +SimpleTest.waitForExplicitFinish(); 1.29 + 1.30 +function test_statusbar() 1.31 +{ 1.32 + var panel = $("panel"); 1.33 + ok(panel.label, "OK", "statusbarpanel label"); 1.34 + ok(panel.image, "happy.png", "statusbarpanel image"); 1.35 + panel.src = "sad.png"; 1.36 + ok(panel.src, "sad.png", "statusbarpanel set src"); 1.37 + ok(panel.getAttribute("src"), "sad.png", "statusbarpanel set src attribute"); 1.38 + 1.39 + SimpleTest.finish(); 1.40 +} 1.41 + 1.42 +]]> 1.43 +</script> 1.44 + 1.45 +</window>