dom/xbl/test/file_bug844783.xhtml

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/xbl/test/file_bug844783.xhtml	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,54 @@
     1.4 +<html xmlns="http://www.w3.org/1999/xhtml">
     1.5 +<!--
     1.6 +https://bugzilla.mozilla.org/show_bug.cgi?id=844783
     1.7 +-->
     1.8 +<head>
     1.9 +  <bindings xmlns="http://www.mozilla.org/xbl">
    1.10 +    <binding id="testBinding">
    1.11 +      <implementation>
    1.12 +        <constructor>
    1.13 +          is(windowExpando, 42, "Expandos show up without explicit waiving");
    1.14 +          someFunction();
    1.15 +          ok(called, "Function called");
    1.16 +          go();
    1.17 +        </constructor>
    1.18 +      </implementation>
    1.19 +      <handlers>
    1.20 +        <handler event="testevent" action="is(boundExpando, 11, 'See expandos on |this|'); SimpleTest.finish();"/>
    1.21 +      </handlers>
    1.22 +    </binding>
    1.23 +  </bindings>
    1.24 +  <script type="application/javascript">
    1.25 +  <![CDATA[
    1.26 +
    1.27 +  is = parent.is;
    1.28 +  ok = parent.ok;
    1.29 +  SimpleTest = parent.SimpleTest;
    1.30 +  window.windowExpando = 42;
    1.31 +  window.someFunction = function() { ok(true, "Called"); window.called = true; };
    1.32 +
    1.33 +  function go() {
    1.34 +    var bound = document.getElementById('bound');
    1.35 +    bound.boundExpando = 11;
    1.36 +    bound.dispatchEvent(new CustomEvent('testevent'));
    1.37 +  }
    1.38 +
    1.39 +  function setup() {
    1.40 +    // When the bindings are applied, the constructor will be invoked and the
    1.41 +    // test will continue.
    1.42 +    document.getElementById('bound').style.MozBinding = 'url(#testBinding)';
    1.43 +  }
    1.44 +
    1.45 +  ]]>
    1.46 +</script>
    1.47 +</head>
    1.48 +<body onload="setup()">
    1.49 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=844783">Mozilla Bug 844783</a>
    1.50 +<p id="display"></p>
    1.51 +<div id="content">
    1.52 +  <div id="bound">Bound element</div>
    1.53 +</div>
    1.54 +<pre id="test">
    1.55 +</pre>
    1.56 +</body>
    1.57 +</html>

mercurial