<!DOCTYPE html>
<html>
<body>
<p>
This tests creating a shadow root with leading and trailing white spaces.
WebKit should not crash. You should see PASS below.
</p>
<div id="host">PASS</div>
<script>
if (window.testRunner)
    testRunner.dumpAsText();

var host = document.getElementById('host');
host.attachShadow({mode: 'closed'}).innerHTML = ' <slot></slot> ';
</script>
</body>
</html>
