blob: ce76a3d1f468a024ba1ac6e4d7d97872ea8d6b45 [file] [log] [blame]
<html>
<head>
<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
<script>
function test()
{
InspectorTest.sendCommand("DOM.enable", {});
InspectorTest.sendCommandOrDie("DOM.getFlattenedDocument", {"depth": -1, "pierce": true}, onDocument);
function onDocument(response) {
function stabilize(key, value) {
var unstableKeys = ["backendNodeId", "documentURL", "baseURL", "frameId"];
if (unstableKeys.indexOf(key) !== -1)
return "<" + typeof(value) + ">";
return value;
}
InspectorTest.log(JSON.stringify(response, stabilize, 2));
InspectorTest.completeTest();
}
}
</script>
<template id="shadow-template">
<style>
:host {
color: red;
}
</style>
<div></div><h1>Hi from a template!</h1></div>
</template>
</head>
<body class="body-class">
<div id="A"> A
<div id="B"> B
<div id="C"> C
<div id="D"> D
<div id="E"> E
</div>
</div>
</div>
</div>
</div>
<iframe src="../dom/resources/simple-iframe.html" width="400" height="200"></iframe>
<div id="shadow-host"></div>
<script type="text/javascript">
var host = document.querySelector("#shadow-host").createShadowRoot();
var template = document.querySelector("#shadow-template");
host.appendChild(template.content);
template.remove();
window.onload = runTest;
</script>
</body>
</html>