<!DOCTYPE html>
<html>
<body>
<script src="../../../resources/js-test-pre.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>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>
