<!DOCTYPE html>
<html>
<body>
<p>This tests dynamically mutating the slot value. WebKit should not crash.</p>
<outer-host style="display: block; -webkit-column-count: 2;"><inner-host style="display: block;"><div id="mutateThis">?<section style="column-span: all;"></section></div></inner-host></outer-host>
<script>

if (window.testRunner)
    testRunner.dumpAsText();

let outerHost = document.querySelector('outer-host');
outerHost.attachShadow({mode: 'closed'}).innerHTML = '<slot></slot>';

let innerHost = document.querySelector('inner-host').attachShadow({mode: 'closed'});
innerHost.innerHTML = '<slot></slot>';

outerHost.getBoundingClientRect();
mutateThis.slot = "f";
outerHost.getBoundingClientRect();
mutateThis.innerText = "";

document.write('PASS - WebKit did not crash');

</script>
</body>
</html>
