OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <link rel="help" href="http://dom.spec.whatwg.org/#dom-node-clonenode"> |
| 3 <script src="../../js/resources/js-test-pre.js"></script> |
| 4 <script> |
| 5 description('Tests cloneNode for Document.'); |
| 6 |
| 7 function className(object) { |
| 8 return Object.prototype.toString.call(object).slice(8, -1); |
| 9 } |
| 10 |
| 11 var doc = document.implementation.createDocument('', 'root', null); |
| 12 |
| 13 shouldBe('doc.cloneNode(false).__proto__', 'Document.prototype'); |
| 14 shouldBeEqualToString('className(doc.cloneNode(false))', 'Document'); |
| 15 shouldBeEqualToString('doc.cloneNode(true).documentElement.localName', 'root'); |
| 16 shouldBeEqualToString('document.cloneNode(true).compatMode', 'CSS1Compat'); |
| 17 shouldBe('document.cloneNode(false).URL', 'document.URL'); |
| 18 shouldBe('document.cloneNode(false).baseURI', 'document.baseURI'); |
| 19 shouldBe('document.cloneNode(false).characterSet', 'document.characterSet'); |
| 20 |
| 21 </script> |
| 22 <script src="../../js/resources/js-test-post.js"></script> |
| 23 </body> |
OLD | NEW |