js/xpconnect/tests/mochitest/test_bug993423.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/xpconnect/tests/mochitest/test_bug993423.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,47 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=993423
     1.8 +-->
     1.9 +<head>
    1.10 +  <meta charset="utf-8">
    1.11 +  <title>Test for Bug 993423</title>
    1.12 +  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.13 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    1.14 +  <script type="application/javascript">
    1.15 +
    1.16 +  /** Test for Bug 993423 **/
    1.17 +  SimpleTest.waitForExplicitFinish();
    1.18 +
    1.19 +  var sCallbackInvocations = 0;
    1.20 +  function callback(handlerIsInXBLScope) {
    1.21 +    ok(!handlerIsInXBLScope, "Event handler should not be in XBL scope");
    1.22 +    if (++sCallbackInvocations == 2)
    1.23 +      SimpleTest.finish();
    1.24 +  }
    1.25 +
    1.26 +  function go() {
    1.27 +    document.querySelector('use').setAttributeNS('http://www.w3.org/1999/xlink',
    1.28 +                                                 'href', location.href + '#a');
    1.29 +  }
    1.30 +
    1.31 +  </script>
    1.32 +</head>
    1.33 +<body onload="go()";>
    1.34 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=993423">Mozilla Bug 993423</a>
    1.35 +<p id="display"></p>
    1.36 +<div id="content" style="display: none">
    1.37 +
    1.38 +</div>
    1.39 +<pre id="test">
    1.40 +</pre>
    1.41 +<svg>
    1.42 +  <symbol id="a">
    1.43 +    <foreignObject>
    1.44 +    <img src="about:logo" onload="var isInXBL = (function() { return this; })() != window; if (isInXBL) callback = window.wrappedJSObject.callback; callback(isInXBL);">
    1.45 +    </foreignObject>
    1.46 +  </symbol>
    1.47 +  <use />
    1.48 +</svg>
    1.49 +</body>
    1.50 +</html>

mercurial