4 .before summary:before {
15 <summary>Should allow generated content inside summary
</summary>
19 if (window
.testRunner
)
20 testRunner
.dumpAsText();
22 var details
= document
.querySelector('details');
24 function assertHeightChangedWithClassName(className
)
26 var oldHeight
= details
.offsetHeight
;
27 details
.className
= className
;
28 var newHeight
= details
.offsetHeight
;
29 document
.body
.appendChild(document
.createTextNode(className
+ ' '));
30 document
.body
.appendChild(document
.createTextNode(newHeight
> oldHeight
? 'PASS' : 'FAIL'));
31 document
.body
.appendChild(document
.createElement('br'));
32 details
.className
= '';
36 assertHeightChangedWithClassName('before');
37 assertHeightChangedWithClassName('after');