<!DOCTYPE html>
<link rel="help" href="https://dom.spec.whatwg.org/#dom-node-clonenode">
<script src="../../../resources/js-test.js"></script>
<script>
description('Tests cloneNode for Document.');
function className(object) {
return Object.prototype.toString.call(object).slice(8, -1);
}
var doc = document.implementation.createDocument('', 'root', null);
shouldBe('doc.cloneNode(false).__proto__', 'XMLDocument.prototype');
shouldBeEqualToString('className(doc.cloneNode(false))', 'XMLDocument');
shouldBeEqualToString('doc.cloneNode(true).documentElement.localName', 'root');
shouldBeEqualToString('doc.cloneNode(true).contentType', 'application/xml');
shouldBeEqualToString('document.cloneNode(true).compatMode', 'CSS1Compat');
shouldBe('document.cloneNode(false).URL', 'document.URL');
shouldBe('document.cloneNode(false).baseURI', 'document.baseURI');
shouldBe('document.cloneNode(false).characterSet', 'document.characterSet');
shouldBeEqualToString('document.cloneNode(true).contentType', 'text/html');
</script>
</body>