Missing cursor/caret showing in search field on google.com
[WebKit-https.git] / LayoutTests / editing / selection / character-data-mutation-crash.html
1 <!DOCTYPE html>\r
2 <html>\r
3 <body>\r
4 <p>This tests modifying the value of text node that's pointed by the selection and executing an editing command. WebKit should not crash and you should see PASS:</p>\r
5 <div id="test" contenteditable>hello world</div>\r
6 <script>\r
7 \r
8 if (window.testRunner)\r
9     testRunner.dumpAsText();\r
10 \r
11 var test = document.getElementById('test');\r
12 test.focus();\r
13 window.getSelection().setBaseAndExtent(test.firstChild, 1, test.firstChild, 10);\r
14 test.firstChild.data = 'hey';\r
15 document.execCommand('insertLineBreak', false, null);\r
16 \r
17 test.innerHTML = 'PASS';\r
18 \r
19 </script>\r
20 </body>\r
21 </html>\r