<!DOCTYPE html>

<style>
    .before summary:before {
      content: "+";
      display: block;
    }
    .after summary:after {
      content: "+";
      display: block;
    }
</style>

<details>
    <summary>Should allow generated content inside summary</summary>
</details>

<script>
if (window.testRunner)
    testRunner.dumpAsText();

var details = document.querySelector('details');

function assertHeightChangedWithClassName(className)
{
    var oldHeight = details.offsetHeight;
    details.className = className;
    var newHeight = details.offsetHeight;
    document.body.appendChild(document.createTextNode(className + ' '));
    document.body.appendChild(document.createTextNode(newHeight > oldHeight ? 'PASS' : 'FAIL'));
    document.body.appendChild(document.createElement('br'));
    details.className = '';
}

onload = function() {
    assertHeightChangedWithClassName('before');
    assertHeightChangedWithClassName('after');
}
</script>
