<style>
.display-when-first-child { display: none; }
.display-when-first-child:first-child { display: block; }
</style>
<div id="test"></div>
<div class="display-when-first-child">PASS</div>
<script>
document.body.removeChild(test);
if (window.testRunner)
    testRunner.dumpAsText();
</script>
