| <p>This tests copying an image which is a direct child of a shadow root. |
| To manually test, copy the image by pressing command / control + c. WebKit should not crash or hit an assertion. |
| testRunner.waitUntilDone(); |
| var host = document.createElement('div'); |
| var root = host.attachShadow({mode: 'closed'}); |
| root.innerHTML = '<img src="../../editing/resources/abe.png" onload="runTest()">'; |
| document.body.appendChild(host); |
| window.getSelection().selectAllChildren(root); |
| document.execCommand('copy', null, false); |
| document.getElementById('result').textContent = 'PASS - WebKit did not crash'; |