test_bug414907.xul 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?xml version="1.0"?>
  2. <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
  3. <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
  4. <!--
  5. https://bugzilla.mozilla.org/show_bug.cgi?id=414907
  6. -->
  7. <window title="Mozilla Bug 414907"
  8. xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  9. <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
  10. <vbox hidden="true">
  11. <bindings xmlns="http://www.mozilla.org/xbl" style="display: block;"
  12. xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  13. <binding id="anon">
  14. <implementation>
  15. <constructor>
  16. <![CDATA[
  17. var node = this.firstChild;
  18. this.palette = node;
  19. this.removeChild(node);
  20. ]]>
  21. </constructor>
  22. </implementation>
  23. </binding>
  24. </bindings>
  25. </vbox>
  26. <!-- test results are displayed in the html:body -->
  27. <body xmlns="http://www.w3.org/1999/xhtml">
  28. <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=414907"
  29. target="_blank">Mozilla Bug 414907</a>
  30. </body>
  31. <!-- test code goes here -->
  32. <script type="application/javascript"><![CDATA[
  33. SimpleTest.waitForExplicitFinish();
  34. window.onload = function onload() {
  35. is($("box").palette.getAttribute("label"), $("command").getAttribute("label"));
  36. SimpleTest.finish();
  37. }
  38. ]]></script>
  39. <command id="command" label="label"/>
  40. <box id="box" style="-moz-binding:url('#anon');">
  41. <button observes="command"/>
  42. </box>
  43. </window>