| <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 <template> elements.</p> |
| |
| <div id="div"></div> |
| <template id="template"> |
| <h1>Header</h1> |
| <p>Paragraph</p> |
| </template> |
| </body> |
| </html> |