|
1 <?xml version="1.0"?> |
|
2 <html xmlns="http://www.w3.org/1999/xhtml"> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=378866 |
|
5 --> |
|
6 <head> |
|
7 <title>Test for Bug 378866</title> |
|
8 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> |
|
10 <bindings xmlns="http://www.mozilla.org/xbl" xmlns:html="http://www.w3.org/1999/xhtml"> |
|
11 <binding id="b1"> |
|
12 <content><html:span><html:span> |
|
13 <children/> |
|
14 </html:span></html:span></content> |
|
15 </binding> |
|
16 </bindings> |
|
17 |
|
18 </head> |
|
19 <body> |
|
20 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=378866">Mozilla Bug 378866</a> |
|
21 <p id="display"></p> |
|
22 <div id="content"> |
|
23 <span id="grandparent" style="-moz-binding: url(#b1);"> |
|
24 <span id="parent"> |
|
25 <span id="child"/> |
|
26 </span> |
|
27 </span> |
|
28 </div> |
|
29 <pre id="test"> |
|
30 <script class="testbody" type="text/javascript"> |
|
31 <![CDATA[ |
|
32 |
|
33 /** Test for Bug 378866 **/ |
|
34 |
|
35 function runTest() { |
|
36 var anon = SpecialPowers.wrap(document).getAnonymousNodes(document.getElementById('grandparent')); |
|
37 var child = SpecialPowers.wrap(document).getElementById('child'); |
|
38 var insertionPoint = anon[0].childNodes[0]; |
|
39 insertionPoint.parentNode.removeChild(insertionPoint); |
|
40 child.appendChild(insertionPoint); |
|
41 |
|
42 var e = document.createEvent("Event"); |
|
43 e.initEvent("foo", true, true); |
|
44 child.dispatchEvent(e); |
|
45 ok(true, "Moving insertion point shouldn't cause problems in event dispatching"); |
|
46 addLoadEvent(SimpleTest.finish); |
|
47 } |
|
48 |
|
49 SimpleTest.waitForExplicitFinish(); |
|
50 addLoadEvent(runTest); |
|
51 |
|
52 ]]> |
|
53 </script> |
|
54 </pre> |
|
55 </body> |
|
56 </html> |
|
57 |