blob: b31088912b828f87048f01a66752752567190a65 [file] [log] [blame]
<p>This tests for a bug in Range::createContextualFragment, it would fail if the range started in a text node. You should see 'The quick brown fox, jumps over the lazy dog" below.</p>
<div id="div" contenteditable="true">The , jumps over the lazy dog.</div>
<script>
if (window.layoutTestController)
window.layoutTestController.dumpAsText();
var div = document.getElementById("div");
var text = div.firstChild;
var sel = window.getSelection();
sel.setPosition(text, 4);
var range = sel.getRangeAt(0);
var html = "quick brown fox";
var frag = range.createContextualFragment(html);
range.insertNode(frag);
</script>