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