Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / content / xbl / test / test_bug468210.xhtml
blobbc6327f9a703cb612ff3971c19a7794fe23367ff
1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <!--
3 https://bugzilla.mozilla.org/show_bug.cgi?id=468210
4 -->
5 <head>
6 <title>Test for Bug 468210</title>
7 <script type="application/javascript" src="/MochiKit/packed.js"></script>
8 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
10 <!-- Keep the stuff inside <content> without spaces, so that the getAnonymousNodes works right -->
11 <bindings xmlns="http://www.mozilla.org/xbl">
12 <binding id="foo">
13 <content><span xmlns='http://www.w3.org/1999/xhtml'><children xmlns="http://www.mozilla.org/xbl"/></span></content>
14 </binding>
15 </bindings>
16 </head>
17 <body>
18 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=468210">Mozilla Bug 468210</a>
19 <p id="display">
20 <div id="d" style="-moz-binding: url(#foo);"></div>
21 <a name="foo"></a>
22 </p>
23 <div id="content" style="display: none">
25 </div>
26 <pre id="test">
27 <script type="application/javascript">
28 <![CDATA[
30 /** Test for Bug 468210 **/
31 SimpleTest.waitForExplicitFinish();
32 addLoadEvent(function() {
33 var div = $("d");
34 var n = document.anchors.length;
35 is(n, 1, "Unexpected number of anchors");
36 var anon = document.getAnonymousNodes(div)[0];
37 is(anon instanceof HTMLSpanElement, true, "Unexpected node");
38 is(anon.parentNode, div, "Unexpected parent");
39 document.body.appendChild(div);
40 is(anon.parentNode, null, "Parent should have become null");
41 // An attr set to test notifications
42 anon.setAttribute("h", "i");
43 });
44 addLoadEvent(SimpleTest.finish);
48 ]]>
49 </script>
50 </pre>
51 </body>
52 </html>