blob: 6686751d3416535a33ee4eb0b7da499f3c10fd2a [file] [log] [blame]
<html>
<head>
<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
<script>
function test() {
WI.domManager.requestDocument(function(documentNode) {
documentNode.querySelector("#div", function(nodeId) {
var domNode = WI.domManager.nodeForId(nodeId);
InspectorTest.expectThat(domNode, "Got DOMNode for div element");
InspectorTest.expectThat(!domNode.templateContent(), "DOMNode does not have template content");
});
documentNode.querySelector("#template", function(nodeId) {
var domNode = WI.domManager.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>