blob: c5a904bba3ca701c264a4966cba641ff1f72e5e4 [file] [log] [blame]
<html>
<head>
<script src="../inspector/inspector-test.js"></script>
<script src="../inspector/elements-test.js"></script>
<script>
function createShadowRoot()
{
if (window.testRunner)
testRunner.waitUntilDone();
var template = document.querySelector('#tmpl');
var root = document.querySelector('#host').createShadowRoot();
root.appendChild(template.content.cloneNode(true));
if (window.testRunner)
testRunner.showWebInspector();
runTest();
}
function test()
{
InspectorTest.runTestSuite([
function testInit(next)
{
InspectorTest.selectNodeAndWaitForStyles("inner", next);
},
function testDumpStyles(next)
{
InspectorTest.dumpSelectedElementStyles(true);
next();
}
]);
}
</script>
</head>
<body onload="createShadowRoot()">
<p>
This test checks that style sheets hosted inside shadow roots
could be inspected.
</p>
<div id="host"></div>
<template id="tmpl">
<style> .red { color: red; } </style>
<div id="inner" class="red">hi!</div>
</template>
</body>
</html>