| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <script src="../resources/js-test-pre.js"></script> |
| <tr id="row"><td id="tablecell" tabindex=0>1</td><td>2</td></tr> |
| <tr id="row2"><td id="tablecell2" tabindex=0>1</td><td>2</td></tr> |
| description("This tests for a crash that can occur while altering an attribute on a table cell because it accesses the table when its in a bad state."); |
| if (window.accessibilityController) { |
| document.getElementById("body").focus(); |
| var body = accessibilityController.focusedElement; |
| var tr = document.createElement("tr"); |
| var td = document.createElement("td"); |
| td.appendChild(document.createTextNode("asdf")); |
| // To reproduce, we need to remove a row and replace with another row, then set an attribute in the meantime. |
| document.getElementById("table").getElementsByTagName("TBODY")[0].removeChild(document.getElementById("row2")); |
| document.getElementById("table").getElementsByTagName("TBODY")[0].appendChild(tr); |
| document.getElementById("tablecell").setAttribute("title", "test"); |
| <script src="../resources/js-test-post.js"></script> |