dom/xbl/test/test_bug772966.xul

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/xbl/test/test_bug772966.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 type="text/css" href="chrome://global/skin"?>
     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=772966
     1.9 +-->
    1.10 +<window title="Mozilla Bug 772966"
    1.11 +        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    1.12 +        onload="runTest()">
    1.13 +  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    1.14 +
    1.15 +  <!-- test results are displayed in the html:body -->
    1.16 +  <body xmlns="http://www.w3.org/1999/xhtml">
    1.17 +  <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=772966"
    1.18 +     target="_blank">Mozilla Bug 772966</a>
    1.19 +  </body>
    1.20 +
    1.21 +  <script>
    1.22 +    function runTest() {
    1.23 +      is(document.getElementById('b').test(123, 123, 123), 2, "Should have 2 params.");
    1.24 +    }
    1.25 +  </script>
    1.26 +  
    1.27 +  <box id="b" style="-moz-binding: url(#binding)"/>
    1.28 +  
    1.29 +  <xbl:bindings xmlns:xbl="http://www.mozilla.org/xbl">
    1.30 +    <xbl:binding id="binding">
    1.31 +      <xbl:implementation>
    1.32 +        <xbl:method name="test">
    1.33 +          <xbl:parameter name="p1"/>
    1.34 +          <xbl:parameter name=""/>
    1.35 +          <xbl:parameter name="p2"/>
    1.36 +          <xbl:body><![CDATA[
    1.37 +            return arguments.callee.length;
    1.38 +          ]]></xbl:body>
    1.39 +        </xbl:method>
    1.40 +      </xbl:implementation>
    1.41 +    </xbl:binding>
    1.42 +  </xbl:bindings>
    1.43 +  
    1.44 +
    1.45 +</window>

mercurial