| Index: LayoutTests/http/tests/inspector-enabled/shadow-dom-rules.html
|
| diff --git a/LayoutTests/http/tests/inspector-enabled/shadow-dom-rules.html b/LayoutTests/http/tests/inspector-enabled/shadow-dom-rules.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b278c84a48a75ab3ea9573dc3a6c7b693aec9de6
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/inspector-enabled/shadow-dom-rules.html
|
| @@ -0,0 +1,50 @@
|
| +<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').webkitCreateShadowRoot();
|
| + root.appendChild(template.content.cloneNode(true));
|
| + if (window.testRunner)
|
| + testRunner.showWebInspector();
|
| + runTest();
|
| +}
|
| +
|
| +function test()
|
| +{
|
| + InspectorTest.runTestSuite([
|
| + function testInit(next)
|
| + {
|
| + WebInspector.settings.showShadowDOM.set(true);
|
| + InspectorTest.selectNodeAndWaitForStyles("inner", next);
|
| + },
|
| +
|
| + function testDumpStyles(next)
|
| + {
|
| + InspectorTest.dumpSelectedElementStyles(true);
|
| + WebInspector.settings.showShadowDOM.set(false);
|
| + 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>
|
|
|