2 .display-when-first-child { display: none; }
3 .display-when-first-child:first-child { display: block; }
5 <div class=
"display-when-first-child">FAIL
</div>
7 var test
= document
.createElement('div');
8 document
.body
.insertBefore(test
, document
.body
.firstChild
);
9 if (document
.body
.innerText
.indexOf('FAIL') < 0)
10 test
.innerText
= 'PASS';
11 if (window
.testRunner
)
12 testRunner
.dumpAsText();