DevTools: add test to verify matched styles for ::content selector

This patch adds test based on the regression issue with styles sidebar
pane not showing styles for ::contet selectors.

BUG=380414

Review URL: https://codereview.chromium.org/316003002

git-svn-id: svn://svn.chromium.org/blink/trunk@175756 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 482bcfe3
This text is bold
Dumping matched rules:
:host ::content * { regular
font-weight: bold;
}
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
<script type="text/javascript" src="css-protocol-test.js"></script>
<script type="text/javascript">
function test()
{
InspectorTest.sendCommandOrDie("CSS.enable", {}, onCSSEnabled);
function onCSSEnabled()
{
InspectorTest.requestNodeId("#shadow-content", onNodeReceived);
}
function onNodeReceived(nodeId)
{
InspectorTest.loadAndDumpMatchingRulesForNode(nodeId, InspectorTest.completeTest.bind(InspectorTest));
}
}
</script>
</head>
<body>
<div id="shadow-host">
<p id="shadow-content">This text is bold</p>
</div>
<script type="text/javascript">
var host = document.querySelector("#shadow-host");
var root = host.createShadowRoot();
root.innerHTML = "<style>:host ::content * { font-weight: bold; }</style><content></content>";
runTest();
</script>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment