Test for cssText of ':host()' rule.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS document.getElementById('style1').sheet.cssRules.item(0).cssText is ".foo:host(body.mytheme) > div { display: block; }"
PASS document.getElementById('style1').sheet.cssRules.item(1).cssText is ":host { display: block; }"
PASS document.getElementById('style1').sheet.cssRules.item(2).cssText is ":host(*) { display: block; }"
PASS document.getElementById('style-invalid').sheet.cssRules.length is 0
PASS successfullyParsed is true
TEST COMPLETE