[email protected] | df04047 | 2011-12-24 05:41:56 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <body> |
| 4 | <p>This tests a crashing scenario where an element with a textbox role attribute which also contenteditable has its content changed.</p> |
| 5 | <div id="textbox" role="textbox" aria-multiline="true" contenteditable="true" tabindex="0"> |
| 6 | Textbox content. |
| 7 | </div> |
| 8 | |
| 9 | <script> |
| 10 | |
| 11 | if (window.accessibilityController) { |
[email protected] | f89df46 | 2012-06-12 20:37:15 | [diff] [blame] | 12 | testRunner.dumpAsText(); |
[email protected] | df04047 | 2011-12-24 05:41:56 | [diff] [blame] | 13 | var textbox = document.getElementById("textbox"); |
| 14 | textbox.focus(); |
| 15 | var textboxAXElement = accessibilityController.focusedElement; |
| 16 | |
| 17 | getSelection().setBaseAndExtent(textbox.firstChild, 0, textbox.firstChild, 0); |
| 18 | |
| 19 | // This should not crash. |
| 20 | document.execCommand("InsertParagraph"); |
| 21 | |
| 22 | document.write("PASS"); |
| 23 | } |
| 24 | |
| 25 | </script> |
| 26 | </body> |
| 27 | </html> |