blob: 536cf060d0f82462f0feaa505d0343e62968f088 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<p id="description">This tests the deletion of text in distributed node does not crash. To run it outside of DRT, you must delete text, 'foo', manually.</p>
<div id="wrapper"><div id="shadowhost" contenteditable><div>foo</div></div></div>
<script>
if (window.testRunner)
testRunner.dumpAsText();
var shadowRoot = document.getElementById('shadowhost').createShadowRoot();
shadowRoot.innerHTML = "<content></content>";
var textNode = document.getElementById('shadowhost').firstChild.firstChild;
window.getSelection().setBaseAndExtent(textNode, 0, textNode, 3);
document.execCommand('Delete');
document.getElementById("wrapper").innerHTML = "PASS";
</script>
</body>
</html>