1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/content/tests/chrome/test_bug554279.xul Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,39 @@ 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 +<window title="Toolbar" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 1.9 + onload="startTest();"> 1.10 + 1.11 + <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> 1.12 + 1.13 + <toolbox> 1.14 + <toolbarpalette id="palette"/> 1.15 + 1.16 + <toolbar id="tb1" currentset="p1"/> 1.17 + </toolbox> 1.18 + 1.19 + <!-- test resuls are displayed in the html:body --> 1.20 + <body xmlns="http://www.w3.org/1999/xhtml" 1.21 + style="height: 300px; overflow: auto;"/> 1.22 + 1.23 + <!-- test code goes here --> 1.24 + <script type="text/javascript"><![CDATA[ 1.25 + var toolbar = $("tb1"); 1.26 + 1.27 + ok(toolbar, "got the toolbar, triggering the xbl constructor"); 1.28 + 1.29 + var palette = $("palette"); 1.30 + ok(palette, "palette is still in the document"); 1.31 + 1.32 + var button = document.createElement("p1"); 1.33 + button.id = button.label = "p1"; 1.34 + palette.appendChild(button); 1.35 + 1.36 + SimpleTest.waitForExplicitFinish(); 1.37 + function startTest() { 1.38 + is(button.parentNode, toolbar, "button has been added to the toolbar"); 1.39 + SimpleTest.finish(); 1.40 + } 1.41 + ]]></script> 1.42 +</window>