1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/xul/document/test/test_bug414907.xul Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,53 @@ 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 +https://bugzilla.mozilla.org/show_bug.cgi?id=414907 1.9 +--> 1.10 +<window title="Mozilla Bug 414907" 1.11 + xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> 1.12 + <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/> 1.13 + 1.14 + <vbox hidden="true"> 1.15 + <bindings xmlns="http://www.mozilla.org/xbl" style="display: block;" 1.16 + xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> 1.17 + <binding id="anon"> 1.18 + <implementation> 1.19 + <constructor> 1.20 + <![CDATA[ 1.21 + var node = this.firstChild; 1.22 + this.palette = node; 1.23 + this.removeChild(node); 1.24 + ]]> 1.25 + </constructor> 1.26 + </implementation> 1.27 + </binding> 1.28 + </bindings> 1.29 + </vbox> 1.30 + 1.31 + <!-- test results are displayed in the html:body --> 1.32 + <body xmlns="http://www.w3.org/1999/xhtml"> 1.33 + <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=414907" 1.34 + target="_blank">Mozilla Bug 414907</a> 1.35 + </body> 1.36 + 1.37 + <!-- test code goes here --> 1.38 + <script type="application/javascript"><![CDATA[ 1.39 + 1.40 + SimpleTest.waitForExplicitFinish(); 1.41 + window.onload = function onload() { 1.42 + is($("box").palette.getAttribute("label"), $("command").getAttribute("label")); 1.43 + SimpleTest.finish(); 1.44 + } 1.45 + 1.46 + ]]></script> 1.47 + 1.48 + <command id="command" label="label"/> 1.49 + 1.50 + <box id="box" style="-moz-binding:url('#anon');"> 1.51 + <button observes="command"/> 1.52 + </box> 1.53 + 1.54 + 1.55 + 1.56 +</window>