| Index: LayoutTests/editing/inserting/insert-paragraph-after-non-editable-node-before-text.html
|
| diff --git a/LayoutTests/editing/inserting/insert-paragraph-after-non-editable-node-before-text.html b/LayoutTests/editing/inserting/insert-paragraph-after-non-editable-node-before-text.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b368ee643a5e20867f1e1b410596234785ab7a86
|
| --- /dev/null
|
| +++ b/LayoutTests/editing/inserting/insert-paragraph-after-non-editable-node-before-text.html
|
| @@ -0,0 +1,42 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<body>
|
| +<script src="../../resources/dump-as-markup.js"></script>
|
| +<div contenteditable="true">
|
| +<span id="imgTest">text1<img src="abe.png"/>text2</span>
|
| +<br>
|
| +<span id="inputTest">text1<input type="text"></input>text2</span>
|
| +<br>
|
| +<span id="objectTest">text1<object style="display: inline" border="1"></object>text2</span>
|
| +</div>
|
| +<script>
|
| +Markup.description('Testcase for bug https://webkit.org/b/115023: Editing: wrong text position when you click enter on the text behind the image.\n'+
|
| +'The test passes if "text2" appears on a new line with the caret placed at the beginning of that line.');
|
| +
|
| +Markup.waitUntilDone();
|
| +
|
| +var test = document.getElementById('imgTest');
|
| +test.focus();
|
| +var selection = window.getSelection();
|
| +selection.collapse(test, test.childNodes.length - 1);
|
| +document.execCommand("InsertParagraph");
|
| +Markup.dump(test);
|
| +
|
| +test = document.getElementById('inputTest');
|
| +test.focus();
|
| +selection = window.getSelection();
|
| +selection.collapse(test, test.childNodes.length - 1);
|
| +document.execCommand("InsertParagraph");
|
| +Markup.dump(test);
|
| +
|
| +test = document.getElementById('objectTest');
|
| +test.focus();
|
| +selection = window.getSelection();
|
| +selection.collapse(test, test.childNodes.length - 1);
|
| +document.execCommand("InsertParagraph");
|
| +Markup.dump(test);
|
| +
|
| +Markup.notifyDone();
|
| +</script>
|
| +</body>
|
| +</html>
|
|
|