| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <body> | 3 <body> |
| 4 <p>This tests selecting all with an open input method composition. | 4 <p>This tests selecting all with an open input method composition. |
| 5 To manually test, type some letter in the editable region below and then select
all. | 5 To manually test, type some letter in the editable region below and then select
all. |
| 6 WebKit should not delete contents.</p> | 6 WebKit should not delete contents.</p> |
| 7 <div id="container"><div contenteditable>PAS</div></div> | 7 <div id="container"><div contenteditable>PAS</div></div> |
| 8 <script src="../../resources/dump-as-markup.js"></script> | 8 <script src="../../resources/dump-as-markup.js"></script> |
| 9 <script> | 9 <script> |
| 10 | 10 |
| 11 if (window.testRunner) { | 11 if (window.testRunner) { |
| 12 var container = document.getElementById('container'); | 12 var container = document.getElementById('container'); |
| 13 container.firstChild.focus(); | 13 container.firstChild.focus(); |
| 14 getSelection().collapse(container.firstChild.firstChild, 5); | 14 getSelection().collapse(container.firstChild.firstChild, 3); |
| 15 if (window.textInputController) { | 15 if (window.textInputController) { |
| 16 Markup.description(document.getElementsByTagName('p')[0].textContent); | 16 Markup.description(document.getElementsByTagName('p')[0].textContent); |
| 17 | 17 |
| 18 textInputController.setMarkedText("S", 0, 1); | 18 textInputController.setMarkedText("S", 0, 1); |
| 19 document.execCommand('selectAll', false, null); | 19 document.execCommand('selectAll', false, null); |
| 20 | 20 |
| 21 Markup.dump(container); | 21 Markup.dump(container); |
| 22 } else | 22 } else |
| 23 Markup.description('FAIL - This test requires textInputController'); | 23 Markup.description('FAIL - This test requires textInputController'); |
| 24 } | 24 } |
| 25 | 25 |
| 26 </script> | 26 </script> |
| 27 </body> | 27 </body> |
| 28 </html> | 28 </html> |
| OLD | NEW |