Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / pasteboard / 4840662.html
blobfd54088c4f2c0b5f1b848fa533f17f7dc7ec8e13
1 <div id="description">This tests for a crash when pasting into a link that is display:block. 'bar' is pasted between 'foo' and 'baz', and must be part of the link in order to acheive the expected paragraph structure. It should be part of the link but of the default font style. <b>'bar' shouldn't be underlined and the second style span is unnecessary, since its only property is overridden by its only child.</b></div>
2 <div id="edit" contenteditable="true"><a id="anchor" href="http://www.google.com/" style="display:block;">foobaz</a></div>
4 <script>
5 var sel = window.getSelection();
6 var anchor = document.getElementById("anchor");
7 var text = anchor.firstChild;
8 sel.collapse(text, 3);
10 document.execCommand("InsertHTML", false, "bar");
11 if (window.testRunner) {
12 testRunner.dumpAsText();
13 document.body.innerText = document.getElementById("description").innerText + "\n" + document.getElementById("edit").innerHTML;
15 </script>