blob: 56b465d11180734584718ebd1972389e244728ee [file] [log] [blame]
<html>
<head>
<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
<script>
function test() {
WI.domManager.requestDocument(function(documentNode) {
WI.domManager.querySelector(documentNode.id, "#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");
});
WI.domManager.querySelector(documentNode.id, "#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>