blob: a44946c9a86e9895b97895435be888c4a4261aa9 [file] [log] [blame]
<title>Tests HTMLDocument cloneNode</title>
<script src="../../../resources/js-test-pre.js"></script>
<script>
description('Tests cloneNode for HTMLDocument.');
function className(object) {
return Object.prototype.toString.call(object).slice(8, -1);
}
shouldBe('document.cloneNode(false).__proto__', 'HTMLDocument.prototype');
shouldBeEqualToString('className(document.cloneNode(false))', 'HTMLDocument');
shouldBe('document.cloneNode(true).title', 'document.title');
shouldBeEqualToString('document.cloneNode(true).compatMode', 'BackCompat');
shouldBeEqualToString('document.cloneNode(true).contentType', 'text/html');
var doc = document.implementation.createHTMLDocument('title');
shouldBe('doc.cloneNode(false).__proto__', 'HTMLDocument.prototype');
shouldBeEqualToString('className(doc.cloneNode(false))', 'HTMLDocument');
shouldBe('doc.cloneNode(true).title', 'doc.title');
shouldBeEqualToString('doc.cloneNode(true).compatMode', 'CSS1Compat');
shouldBeEqualToString('doc.cloneNode(true).contentType', 'text/html');
</script>
<script src="../../../resources/js-test-post.js"></script>