Bug 1941128 - Turn off network.dns.native_https_query on Mac again
[gecko.git] / dom / bindings / test / test_cloneAndImportNode.html
blob4acfec82cd37b71ef996e01ef1094d973bda01f8
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=882541
5 -->
6 <head>
7 <meta charset="utf-8">
8 <title>Test for Bug 882541</title>
9 <script src="/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
11 <script type="application/javascript">
13 /** Test for Bug 882541 **/
14 var div = document.createElement("div");
15 div.appendChild(document.createElement("span"));
17 var div2;
19 div2 = div.cloneNode();
20 is(div2.childNodes.length, 0, "cloneNode() should do a shallow clone");
22 div2 = div.cloneNode(undefined);
23 is(div2.childNodes.length, 0, "cloneNode(undefined) should do a shallow clone");
25 div2 = div.cloneNode(true);
26 is(div2.childNodes.length, 1, "cloneNode(true) should do a deep clone");
28 div2 = document.importNode(div);
29 is(div2.childNodes.length, 0, "importNode(node) should do a deep import");
31 div2 = document.importNode(div, undefined);
32 is(div2.childNodes.length, 0, "importNode(undefined) should do a shallow import");
34 div2 = document.importNode(div, true);
35 is(div2.childNodes.length, 1, "importNode(true) should do a deep import");
37 </script>
38 </head>
39 <body>
40 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=882541">Mozilla Bug 882541</a>
41 <p id="display"></p>
42 <div id="content" style="display: none">
44 </div>
45 <pre id="test">
46 </pre>
47 </body>
48 </html>