|
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 |
|
13 /** Test for Bug 993423 **/ |
|
14 SimpleTest.waitForExplicitFinish(); |
|
15 |
|
16 var sCallbackInvocations = 0; |
|
17 function callback(handlerIsInXBLScope) { |
|
18 ok(!handlerIsInXBLScope, "Event handler should not be in XBL scope"); |
|
19 if (++sCallbackInvocations == 2) |
|
20 SimpleTest.finish(); |
|
21 } |
|
22 |
|
23 function go() { |
|
24 document.querySelector('use').setAttributeNS('http://www.w3.org/1999/xlink', |
|
25 'href', location.href + '#a'); |
|
26 } |
|
27 |
|
28 </script> |
|
29 </head> |
|
30 <body onload="go()";> |
|
31 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=993423">Mozilla Bug 993423</a> |
|
32 <p id="display"></p> |
|
33 <div id="content" style="display: none"> |
|
34 |
|
35 </div> |
|
36 <pre id="test"> |
|
37 </pre> |
|
38 <svg> |
|
39 <symbol id="a"> |
|
40 <foreignObject> |
|
41 <img src="about:logo" onload="var isInXBL = (function() { return this; })() != window; if (isInXBL) callback = window.wrappedJSObject.callback; callback(isInXBL);"> |
|
42 </foreignObject> |
|
43 </symbol> |
|
44 <use /> |
|
45 </svg> |
|
46 </body> |
|
47 </html> |