dom/xbl/test/file_bug844783.xhtml

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:6b37cb287a37
1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <!--
3 https://bugzilla.mozilla.org/show_bug.cgi?id=844783
4 -->
5 <head>
6 <bindings xmlns="http://www.mozilla.org/xbl">
7 <binding id="testBinding">
8 <implementation>
9 <constructor>
10 is(windowExpando, 42, "Expandos show up without explicit waiving");
11 someFunction();
12 ok(called, "Function called");
13 go();
14 </constructor>
15 </implementation>
16 <handlers>
17 <handler event="testevent" action="is(boundExpando, 11, 'See expandos on |this|'); SimpleTest.finish();"/>
18 </handlers>
19 </binding>
20 </bindings>
21 <script type="application/javascript">
22 <![CDATA[
23
24 is = parent.is;
25 ok = parent.ok;
26 SimpleTest = parent.SimpleTest;
27 window.windowExpando = 42;
28 window.someFunction = function() { ok(true, "Called"); window.called = true; };
29
30 function go() {
31 var bound = document.getElementById('bound');
32 bound.boundExpando = 11;
33 bound.dispatchEvent(new CustomEvent('testevent'));
34 }
35
36 function setup() {
37 // When the bindings are applied, the constructor will be invoked and the
38 // test will continue.
39 document.getElementById('bound').style.MozBinding = 'url(#testBinding)';
40 }
41
42 ]]>
43 </script>
44 </head>
45 <body onload="setup()">
46 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=844783">Mozilla Bug 844783</a>
47 <p id="display"></p>
48 <div id="content">
49 <div id="bound">Bound element</div>
50 </div>
51 <pre id="test">
52 </pre>
53 </body>
54 </html>

mercurial