| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <meta charset=utf-8> | 2 <meta charset=utf-8> |
| 3 <title>Node.cloneNode</title> | 3 <title>Node.cloneNode</title> |
| 4 <link rel=help href="https://dom.spec.whatwg.org/#dom-node-clonenode"> | 4 <link rel=help href="https://dom.spec.whatwg.org/#dom-node-clonenode"> |
| 5 <script src="../../../../resources/testharness.js"></script> | 5 <script src="/resources/testharness.js"></script> |
| 6 <script src="../../../../resources/testharnessreport.js"></script> | 6 <script src="/resources/testharnessreport.js"></script> |
| 7 <div id=log></div> | 7 <div id=log></div> |
| 8 <script> | 8 <script> |
| 9 function assert_equal_node(nodeA, nodeB) { | 9 function assert_equal_node(nodeA, nodeB) { |
| 10 assert_equals(nodeB.nodeType, nodeA.nodeType, "nodeType"); | 10 assert_equals(nodeB.nodeType, nodeA.nodeType, "nodeType"); |
| 11 assert_equals(nodeB.nodeName, nodeA.nodeName, "nodeName"); | 11 assert_equals(nodeB.nodeName, nodeA.nodeName, "nodeName"); |
| 12 | 12 |
| 13 if (nodeA.nodeType === Node.ELEMENT_NODE) { | 13 if (nodeA.nodeType === Node.ELEMENT_NODE) { |
| 14 assert_equals(nodeB.prefix, nodeA.prefix); | 14 assert_equals(nodeB.prefix, nodeA.prefix); |
| 15 assert_equals(nodeB.namespaceURI, nodeA.namespaceURI); | 15 assert_equals(nodeB.namespaceURI, nodeA.namespaceURI); |
| 16 assert_equals(nodeB.localName, nodeA.localName); | 16 assert_equals(nodeB.localName, nodeA.localName); |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 assert_equals(copy.childNodes[1].childNodes.length, 1); | 263 assert_equals(copy.childNodes[1].childNodes.length, 1); |
| 264 check_copy(grandChild, copy.childNodes[1].childNodes[0], HTMLDivElement); | 264 check_copy(grandChild, copy.childNodes[1].childNodes[0], HTMLDivElement); |
| 265 | 265 |
| 266 deep = false; | 266 deep = false; |
| 267 copy = parent.cloneNode(deep); | 267 copy = parent.cloneNode(deep); |
| 268 | 268 |
| 269 check_copy(parent, copy, HTMLDivElement); | 269 check_copy(parent, copy, HTMLDivElement); |
| 270 assert_equals(copy.childNodes.length, 0); | 270 assert_equals(copy.childNodes.length, 0); |
| 271 }, "node with children"); | 271 }, "node with children"); |
| 272 </script> | 272 </script> |
| OLD | NEW |