blob: f340ffb6136a4a9d2ca925e0443fc21330e849c1 [file] [log] [blame]
<html>
<head>
<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
<script>
function test() {
WI.domTreeManager.requestDocument(function(documentNode) {
WI.domTreeManager.querySelector(documentNode.id, "#div", function(nodeId) {
var domNode = WI.domTreeManager.nodeForId(nodeId);
InspectorTest.expectThat(domNode, "Got DOMNode for div element");
InspectorTest.expectThat(!domNode.templateContent(), "DOMNode does not have template content");
});
WI.domTreeManager.querySelector(documentNode.id, "#template", function(nodeId) {
var domNode = WI.domTreeManager.nodeForId(nodeId);
InspectorTest.log("");
InspectorTest.expectThat(domNode, "Got DOMNode for template element");
InspectorTest.expectThat(domNode.templateContent(), "DOMNode has template content");
InspectorTest.completeTest();
});
});
}
</script>
</head>
<body onload="runTest()">
<p>Test that we include template content in DOM Nodes for &lt;template&gt; elements.</p>
<div id="div"></div>
<template id="template">
<h1>Header</h1>
<p>Paragraph</p>
</template>
</body>
</html>