4 <script src=
"../../resources/dump-as-markup.js"></script>
5 <div contenteditable=
"true">
6 <span id=
"imgTest">text1
<img src=
"abe.png"/>text2
</span>
8 <span id=
"inputTest">text1
<input type=
"text"></input>text2
</span>
10 <span id=
"objectTest">text1
<object style=
"display: inline" border=
"1"></object>text2
</span>
13 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'+
14 'The test passes if "text2" appears on a new line with the caret placed at the beginning of that line.');
16 Markup
.waitUntilDone();
18 var test
= document
.getElementById('imgTest');
20 var selection
= window
.getSelection();
21 selection
.collapse(test
, test
.childNodes
.length
- 1);
22 document
.execCommand("InsertParagraph");
25 test
= document
.getElementById('inputTest');
27 selection
= window
.getSelection();
28 selection
.collapse(test
, test
.childNodes
.length
- 1);
29 document
.execCommand("InsertParagraph");
32 test
= document
.getElementById('objectTest');
34 selection
= window
.getSelection();
35 selection
.collapse(test
, test
.childNodes
.length
- 1);
36 document
.execCommand("InsertParagraph");