blob: 55e07d400c9df317de3414447c48e0ee003df5b6 [file] [log] [blame]
<html>
<head>
<script src="../../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, true);
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>