test_bug993423.html 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <!DOCTYPE HTML>
  2. <html>
  3. <!--
  4. https://bugzilla.mozilla.org/show_bug.cgi?id=993423
  5. -->
  6. <head>
  7. <meta charset="utf-8">
  8. <title>Test for Bug 993423</title>
  9. <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  10. <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
  11. <script type="application/javascript">
  12. /** Test for Bug 993423 **/
  13. SimpleTest.waitForExplicitFinish();
  14. var sCallbackInvocations = 0;
  15. function callback(handlerIsInXBLScope) {
  16. ok(!handlerIsInXBLScope, "Event handler should not be in XBL scope");
  17. if (++sCallbackInvocations == 2)
  18. SimpleTest.finish();
  19. }
  20. function go() {
  21. document.querySelector('use').setAttributeNS('http://www.w3.org/1999/xlink',
  22. 'href', location.href + '#a');
  23. }
  24. </script>
  25. </head>
  26. <body onload="go()";>
  27. <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=993423">Mozilla Bug 993423</a>
  28. <p id="display"></p>
  29. <div id="content" style="display: none">
  30. </div>
  31. <pre id="test">
  32. </pre>
  33. <svg>
  34. <symbol id="a">
  35. <foreignObject>
  36. <img src="about:logo" onload="var isInXBL = (function() { return this; })() != window; if (isInXBL) callback = window.wrappedJSObject.callback; callback(isInXBL);">
  37. </foreignObject>
  38. </symbol>
  39. <use />
  40. </svg>
  41. </body>
  42. </html>