chromium/third_party/blink/web_tests/fast/dom/shadow/host-pseudo-class-css-text.html

<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
<style id="style1">
.foo:host(body.mytheme) > div { display: block; }
:host { display: block; }
:host(*) { display: block; }
</style>
<style id="style-invalid">
:host(.a, .b) { display: block }
:host(div div) { display: block }
:host(div > div) { display: block }
:host(div + div) { display: block }
:host(div ~ div) { display: block }
:host) { display: block }
:host() { display: block; }
</style>
</head>
<script>
description("Test for cssText of ':host()' rule.");
shouldBeEqualToString("document.getElementById('style1').sheet.cssRules.item(0).cssText", ".foo:host(body.mytheme) > div { display: block; }");
shouldBeEqualToString("document.getElementById('style1').sheet.cssRules.item(1).cssText", ":host { display: block; }");
shouldBeEqualToString("document.getElementById('style1').sheet.cssRules.item(2).cssText", ":host(*) { display: block; }");
shouldBe("document.getElementById('style-invalid').sheet.cssRules.length", "0");
</script>
</html>