| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <script src="../resources/js-test-pre.js"></script> |
| <table id="testTable" summary="A summary to make sure this is always exposed as an AXTable"> |
| description("This tests that retrieving a cell for a table multiple times doesn't crash."); |
| if (window.accessibilityController) { |
| document.getElementById("body").focus(); |
| var axBody = accessibilityController.focusedElement; |
| var axTable = axBody.childAtIndex(0); |
| shouldBe("axTable.role", "'AXRole: AXTable'"); |
| // Trying to reference the same cell for the table |
| // multiple times shouldn't result in a crash. |
| for (var i = 0; i < 10; i++) { |
| var axCell = axTable.cellForColumnAndRow(0, 0); |
| shouldBe("axCell.role", "'AXRole: AXCell'"); |
| // We need to force a call to the Garbage Collector here so we are |
| // sure that axCell will get actually destroyed after using it. |
| <script src="../resources/js-test-post.js"></script> |