blob: c18a73d1079a37858cd969b8fc5d91eca1462487 [file] [log] [blame]
<html>
<head>
<script src="../js/resources/js-test-pre.js"></script>
</head>
<body>
<p>This page tests calling document.importNode.</p>
<div id='console'></div>
<script>
var imported;
if (window.testRunner)
testRunner.dumpAsText();
var d = document.createElement("div");
d.innerHTML = "<span>hello </span><span>world</span>";
imported = document.importNode(d);
shouldBe('imported.childNodes.length','2');
shouldBeTrue("imported.textContent == 'hello world'");
imported = document.importNode(d, true);
shouldBe('imported.childNodes.length','2');
shouldBeTrue("imported.textContent == 'hello world'");
imported = document.importNode(d, false);
shouldBe('imported.childNodes.length','0');
shouldBeTrue("imported.textContent == ''");
</script>
</body>
</html>